|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface InternalPasswordCredentialInterceptor
Callback component interface used by DefaultCredentialHandler
allowing injecting custom logic on certain events of the InternalCredential
.
Method Summary | |
---|---|
boolean |
afterAuthenticated(InternalUserPrincipal internalUser,
String userName,
InternalCredential credential,
boolean authenticated)
Invoked during authentication after the provided password is compared against the one retrieved from the InternalCredential. |
boolean |
afterLoad(PasswordCredentialProvider pcProvider,
String userName,
InternalCredential credential)
Invoked after a password credential is loaded from the persistent store. |
void |
beforeCreate(InternalUserPrincipal internalUser,
Collection credentials,
String userName,
InternalCredential credential,
String password)
Invoked when the first password credential is to be saved for a user. |
void |
beforeSetPassword(InternalUserPrincipal internalUser,
Collection credentials,
String userName,
InternalCredential credential,
String password,
boolean authenticated)
Invoked when a new password value is to be saved for a user. |
Method Detail |
---|
boolean afterLoad(PasswordCredentialProvider pcProvider, String userName, InternalCredential credential) throws SecurityException
Invoked after a password credential is loaded from the persistent store.
If true is returned the credential is expected to be updated and its changes will be stored again.
A thrown SecurityException will be logged as an error and result in the credential to be ignored as if not existing (like for authentication).
pcProvider
- provides callback access to for instance the configured CredentialPasswordEncoder
and
CredentialPasswordValidator
userName
- the name of the principal to which the credential belongscredential
- the credential just loaded from the persistent store
SecurityException
org.apache.jetspeed.security.spi.impl.DefaultCredentialHandler#getPasswordCredential(InternalUserPrincipal, String)
,
org.apache.jetspeed.security.spi.impl.DefaultCredentialHandler#setPasswordExpiration(String, java.sql.Date)
boolean afterAuthenticated(InternalUserPrincipal internalUser, String userName, InternalCredential credential, boolean authenticated) throws SecurityException
Invoked during authentication after the provided password is compared against the one retrieved from the InternalCredential.
If true is returned, the credential is expected to be updated and its enabled
and expired
flags will checked if the credential is (still) valid.
Note: the enabled and expired flags are only checked if this method returns true.
A thrown SecurityException will be passed on to the authentication requestor.
internalUser
- the user to which the credential belongsuserName
- the name of the principal to which the credential belongscredential
- the credential of the userauthenticated
- true if the provided password matches the value of the credential
SecurityException
org.apache.jetspeed.security.spi.impl.DefaultCredentialHandler#authenticate(String, String)
void beforeCreate(InternalUserPrincipal internalUser, Collection credentials, String userName, InternalCredential credential, String password) throws SecurityException
Invoked when the first password credential is to be saved for a user.
This callback method can be used to set default values like the expiration date
.
A thrown SecurityException is passed on to the new password requestor.
internalUser
- the user to which the credential belongscredentials
- the collection of credentials which will set on the user after (already contains the new credential)userName
- the name of the principal to which the credential belongscredential
- the credential of the userpassword
- the new password value (already set on the new credential)
SecurityException
org.apache.jetspeed.security.spi.impl.DefaultCredentialHandler#setPassword(String, String, String)
void beforeSetPassword(InternalUserPrincipal internalUser, Collection credentials, String userName, InternalCredential credential, String password, boolean authenticated) throws SecurityException
Invoked when a new password value is to be saved for a user.
The new password value is not yet set on the provided credential when this callback is invoked. This allows custom history maintenance and/or auditing to be performed.
The provided authenticated flag can be used to differentiate between a new password value set directly by a user itself or through an administrative interface.
After this callback is invoked, the specified password value will be set, as well as a reset of the
updateRequired
flag, before the credential is saved.
A thrown SecurityException is passed on to the set password requestor.
internalUser
- the user to which the credential belongscredentials
- the collection of credentials which will set on the user after (already contains the new credential)userName
- the name of the principal to which the credential belongscredential
- the credential of the userpassword
- the new password value (already set on the new credential)authenticated
- true if the new password value is provided by the user directly
SecurityException
org.apache.jetspeed.security.spi.impl.DefaultCredentialHandler#setPassword(String, String, String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |