Package org.ametys.core.authentication
Class AbstractCredentialProvider
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.authentication.AbstractCredentialProvider
-
- All Implemented Interfaces:
CredentialProvider
,LogEnabled
,Component
- Direct Known Subclasses:
BasicCredentialProvider
,CASCredentialProvider
,DefinedCredentialProvider
,FormCredentialProvider
,KerberosCredentialProvider
,RemoteUserCredentialProvider
,UserDAO.ImpersonateCredentialProvider
public abstract class AbstractCredentialProvider extends AbstractLogEnabled implements CredentialProvider, Component
Abstract implementation ofCredentialProvider
, which is configurable. Extends this class for implementing a CredentialProvider (and implementNonBlockingCredentialProvider
,BlockingCredentialProvider
or both)
-
-
Field Summary
Fields Modifier and Type Field Description private String
_cpModelId
private String
_id
private String
_label
private Map<String,Object>
_paramValues
-
Constructor Summary
Constructors Constructor Description AbstractCredentialProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getCredentialProviderModelId()
Get the id of theCredentialProviderModel
extension pointString
getId()
A unique identifierString
getLabel()
Get the label of the CredentialProviderMap<String,Object>
getParameterValues()
Get the values of parameters (from credential provider model)int
hashCode()
void
init(String id, String cpModelId, Map<String,Object> paramValues, String label)
Initialize the credential provider with given parameters' values.-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.core.authentication.CredentialProvider
getUserIdentity, grantAnonymousRequest, isStillConnected, userAllowed, userNotAllowed
-
-
-
-
Field Detail
-
_cpModelId
private String _cpModelId
-
_paramValues
private Map<String,Object> _paramValues
-
-
Constructor Detail
-
AbstractCredentialProvider
public AbstractCredentialProvider()
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:CredentialProvider
A unique identifier- Specified by:
getId
in interfaceCredentialProvider
- Returns:
- The non-null and non-empty identifier
-
getLabel
public String getLabel()
Description copied from interface:CredentialProvider
Get the label of the CredentialProvider- Specified by:
getLabel
in interfaceCredentialProvider
- Returns:
- The label
-
getCredentialProviderModelId
public String getCredentialProviderModelId()
Description copied from interface:CredentialProvider
Get the id of theCredentialProviderModel
extension point- Specified by:
getCredentialProviderModelId
in interfaceCredentialProvider
- Returns:
- the id of extension point
-
getParameterValues
public Map<String,Object> getParameterValues()
Description copied from interface:CredentialProvider
Get the values of parameters (from credential provider model)- Specified by:
getParameterValues
in interfaceCredentialProvider
- Returns:
- the parameters' values
-
init
public void init(String id, String cpModelId, Map<String,Object> paramValues, String label)
Description copied from interface:CredentialProvider
Initialize the credential provider with given parameters' values.- Specified by:
init
in interfaceCredentialProvider
- Parameters:
id
- The unique identifiercpModelId
- The id of credential provider extension pointparamValues
- The parameters' valueslabel
- The specific label of this instance. Can be null
-
-