public class RemoteUserCredentialProvider extends AbstractCredentialProvider implements NonBlockingCredentialProvider, Contextualizable
AuthenticableBaseUser
Modifier and Type | Field and Description |
---|---|
private static String |
__PARAM_HEADER_NAME
Name of the parameter holding the header name
|
private static String |
__PARAM_REALM
Name of the parameter holding the authentication realm
|
private Context |
_context |
protected String |
_headerName
The header name
|
protected String |
_realm
The realm
|
Constructor and Description |
---|
RemoteUserCredentialProvider() |
Modifier and Type | Method and Description |
---|---|
void |
contextualize(Context context) |
void |
init(String id,
String cpModelId,
Map<String,Object> paramValues,
String label)
Initialize the credential provider with given parameters' values.
|
UserIdentity |
nonBlockingGetUserIdentity(Redirector redirector)
Method called by AuthenticateAction each time a request need
authentication.
|
boolean |
nonBlockingGrantAnonymousRequest()
Method called by AuthenticateAction before asking for credentials.
|
boolean |
nonBlockingIsStillConnected(UserIdentity userIdentity,
Redirector redirector)
Validates that the user specify is still connected
|
void |
nonBlockingUserAllowed(UserIdentity userIdentity)
Method called by AuthenticateAction after authentication process succeeded
|
void |
nonBlockingUserNotAllowed(Redirector redirector)
Method called by AuthenticateAction each a user could not get
authenticated.
|
equals, getCredentialProviderModelId, getId, getLabel, getParameterValues, hashCode
getLogger, setLogger
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getCredentialProviderModelId, getId, getLabel, getParameterValues, getUserIdentity, grantAnonymousRequest, isStillConnected, userAllowed, userNotAllowed
private static final String __PARAM_REALM
private static final String __PARAM_HEADER_NAME
protected String _headerName
public RemoteUserCredentialProvider()
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void init(String id, String cpModelId, Map<String,Object> paramValues, String label)
CredentialProvider
init
in interface CredentialProvider
init
in class AbstractCredentialProvider
id
- The unique identifiercpModelId
- The id of credential provider extension pointparamValues
- The parameters' valueslabel
- The specific label of this instance. Can be nullpublic boolean nonBlockingIsStillConnected(UserIdentity userIdentity, Redirector redirector) throws Exception
NonBlockingCredentialProvider
nonBlockingIsStillConnected
in interface NonBlockingCredentialProvider
userIdentity
- the user previously correctly identified with this credential providerredirector
- The cocoon redirectorException
- If an error occurredpublic boolean nonBlockingGrantAnonymousRequest()
NonBlockingCredentialProvider
nonBlockingGrantAnonymousRequest
in interface NonBlockingCredentialProvider
public UserIdentity nonBlockingGetUserIdentity(Redirector redirector) throws Exception
NonBlockingCredentialProvider
nonBlockingGetUserIdentity
in interface NonBlockingCredentialProvider
redirector
- the cocoon redirector.UserIdentity
corresponding to the user (with or without population specified), or null if user could not get authenticated.Exception
- if something wrong occurspublic void nonBlockingUserNotAllowed(Redirector redirector) throws Exception
NonBlockingCredentialProvider
nonBlockingUserNotAllowed
in interface NonBlockingCredentialProvider
redirector
- the cocoon Redirector that can be used for redirecting response.Exception
- if something wrong occurspublic void nonBlockingUserAllowed(UserIdentity userIdentity)
NonBlockingCredentialProvider
nonBlockingUserAllowed
in interface NonBlockingCredentialProvider
userIdentity
- The user correctly connected