public interface CredentialProvider
BlockingCredentialProvider
,
either NonBlockingCredentialProvider
or both.Modifier and Type | Method and Description |
---|---|
String |
getCredentialProviderModelId()
Get the id of the
CredentialProviderModel extension point |
String |
getId()
A unique identifier
|
String |
getLabel()
Get the label of the CredentialProvider
|
Map<String,Object> |
getParameterValues()
Get the values of parameters (from credential provider model)
|
default UserIdentity |
getUserIdentity(boolean blockingkMode,
Redirector redirector)
Method called by AuthenticateAction each time a request need
authentication.
|
default boolean |
grantAnonymousRequest(boolean blockingkMode)
Method called by AuthenticateAction before asking for credentials.
|
void |
init(String id,
String cpModelId,
Map<String,Object> paramValues,
String label)
Initialize the credential provider with given parameters' values.
|
default boolean |
isStillConnected(boolean blockingkMode,
UserIdentity userCurrentlyConnected,
Redirector redirector)
Validates that the user specify is still connected
|
default void |
userAllowed(boolean blockingkMode,
UserIdentity userIdentity)
Method called by AuthenticateAction after authentication process succeeded
|
default void |
userNotAllowed(boolean blockingkMode,
Redirector redirector)
Method called by AuthenticateAction each a user could not get
authenticated.
|
String getCredentialProviderModelId()
CredentialProviderModel
extension pointMap<String,Object> getParameterValues()
void init(String id, String cpModelId, Map<String,Object> paramValues, String label) throws Exception
id
- The unique identifiercpModelId
- The id of credential provider extension pointparamValues
- The parameters' valueslabel
- The specific label of this instance. Can be nullException
- If an error occurreddefault boolean grantAnonymousRequest(boolean blockingkMode)
blockingkMode
- true to use the blocking mode of the credential provider if available, false to use the non blocking mode if availabledefault boolean isStillConnected(boolean blockingkMode, UserIdentity userCurrentlyConnected, Redirector redirector) throws Exception
userCurrentlyConnected
- the user previously correctly identified with this credential providerblockingkMode
- true to use the blocking mode of the credential provider if available, false to use the non blocking mode if availableredirector
- The cocoon redirectorException
- If an error occurreddefault UserIdentity getUserIdentity(boolean blockingkMode, Redirector redirector) throws Exception
blockingkMode
- true to use the blocking mode of the credential provider if available, false to use the non blocking mode if availableredirector
- the cocoon redirector.UserIdentity
corresponding to the user (with or without population specified), or null if user could not get authenticated.Exception
- If an error occurreddefault void userNotAllowed(boolean blockingkMode, Redirector redirector) throws Exception
blockingkMode
- true to use the blocking mode of the credential provider if available, false to use the non blocking mode if availableredirector
- the cocoon Redirector that can be used for redirecting response.Exception
- if something wrong occursdefault void userAllowed(boolean blockingkMode, UserIdentity userIdentity)
blockingkMode
- true to use the blocking mode of the credential provider if available, false to use the non blocking mode if availableuserIdentity
- The user correctly connected