|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jetspeed.security.spi.impl.AbstractInternalPasswordCredentialInterceptorImpl
org.apache.jetspeed.security.spi.impl.EncodePasswordOnFirstLoadInterceptor
public class EncodePasswordOnFirstLoadInterceptor
Encodes (encrypts) an InternalCredential password using the configured encoder
if it is loaded unencoded from the persistent store.
This interceptor is useful when credentials need to be preset in the persistent store (like through scripts) or migrated unencoded from a different storage.
| Constructor Summary | |
|---|---|
EncodePasswordOnFirstLoadInterceptor()
|
|
| Method Summary | |
|---|---|
boolean |
afterLoad(PasswordCredentialProvider pcProvider,
java.lang.String userName,
InternalCredential credential)
Invoked after a password credential is loaded from the persistent store. |
| Methods inherited from class org.apache.jetspeed.security.spi.impl.AbstractInternalPasswordCredentialInterceptorImpl |
|---|
afterAuthenticated, beforeCreate, beforeSetPassword |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EncodePasswordOnFirstLoadInterceptor()
| Method Detail |
|---|
public boolean afterLoad(PasswordCredentialProvider pcProvider,
java.lang.String userName,
InternalCredential credential)
throws SecurityException
InternalPasswordCredentialInterceptorInvoked 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).
afterLoad in interface InternalPasswordCredentialInterceptorafterLoad in class AbstractInternalPasswordCredentialInterceptorImplpcProvider - provides callback access to for instance the configured CredentialPasswordEncoder and
CredentialPasswordValidatoruserName - the name of the principal to which the credential belongscredential - the credential just loaded from the persistent store
SecurityExceptionInternalPasswordCredentialInterceptor.afterLoad(org.apache.jetspeed.security.spi.PasswordCredentialProvider, java.lang.String, org.apache.jetspeed.security.om.InternalCredential)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||