...
Code Block |
---|
public interface LoginCredential { String getUserId(); void setUserId(String userId); Credential getCredential(); void setCredential(Credential credential); void invalidate(); } |
SPI
AuthenticatorSelector
Used to find the current Authenticator
- e.g. to provide different login-types used by the same client (e.g. a component in an UI).
TODO discuss default (internal) Authenticator if there is no custom implementation.
Code Block |
---|
public interface AuthenticatorSelector { Class<? extends Authenticator> getAuthenticatorClass(); void setAuthenticatorClass(Class<? extends Authenticator> authenticatorClass); String getAuthenticatorName(); void setAuthenticatorName(String authenticatorName); Authenticator getSelectedAuthenticator(); } |
Authenticator
Called by Identity
and performs the final authentication based on the information in LoginCredential
.
Code Block |
---|
public interface Authenticator { public enum AuthenticationStatus { SUCCESS, FAILURE, DEFERRED } void authenticate(); void postAuthenticate(); AuthenticationStatus getStatus(); User getUser(); } |
...