Class Saml2LoginModule
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule
-
- org.apache.sling.auth.saml2.sp.Saml2LoginModule
-
- All Implemented Interfaces:
LoginModule
public class Saml2LoginModule extends org.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule
-
-
Constructor Summary
Constructors Constructor Description Saml2LoginModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanabort()protected voidclearState()booleancommit()Method to commit the authentication process (phase 2).protected Set<Class>getSupportedCredentials()voidinitialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)booleanlogin()Method to authenticate aSubject(phase 1).-
Methods inherited from class org.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule
closeSystemSession, getCredentials, getLoginModuleMonitor, getPrincipalProvider, getPrincipals, getPrincipals, getRoot, getSecurityProvider, getSharedCredentials, getSharedLoginName, getSharedPreAuthLogin, getUserManager, getWhiteboard, logout, logout, onError, setAuthInfo
-
-
-
-
Method Detail
-
getSupportedCredentials
@Nonnull protected Set<Class> getSupportedCredentials()
- Specified by:
getSupportedCredentialsin classorg.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule
-
login
public boolean login() throws LoginExceptionMethod to authenticate aSubject(phase 1).The implementation of this method authenticates a
Subject. For example, it may prompt forSubjectinformation such as a username and password and then attempt to verify the password. This method saves the result of the authentication attempt as private state within the LoginModule.- Returns:
- true if the authentication succeeded, or false if this
LoginModuleshould be ignored. - Throws:
LoginException- if the authentication fails
-
commit
public boolean commit() throws LoginExceptionMethod to commit the authentication process (phase 2).This method is called if the LoginContext's overall authentication succeeded (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules succeeded).
If this LoginModule's own authentication attempt succeeded (checked by retrieving the private state saved by the
loginmethod), then this method associates relevant Principals and Credentials with theSubjectlocated in theLoginModule. If this LoginModule's own authentication attempted failed, then this method removes/destroys any state that was originally saved.- Returns:
- true if this method succeeded, or false if this
LoginModuleshould be ignored. - Throws:
LoginException- if the commit fails
-
initialize
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
- Specified by:
initializein interfaceLoginModule- Overrides:
initializein classorg.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule
-
abort
public boolean abort() throws LoginException- Specified by:
abortin interfaceLoginModule- Overrides:
abortin classorg.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule- Throws:
LoginException
-
clearState
protected void clearState()
- Overrides:
clearStatein classorg.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule
-
-