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 boolean
abort()
protected void
clearState()
boolean
commit()
Method to commit the authentication process (phase 2).protected Set<Class>
getSupportedCredentials()
void
initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
boolean
login()
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:
getSupportedCredentials
in classorg.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule
-
login
public boolean login() throws LoginException
Method to authenticate aSubject
(phase 1).The implementation of this method authenticates a
Subject
. For example, it may prompt forSubject
information 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
LoginModule
should be ignored. - Throws:
LoginException
- if the authentication fails
-
commit
public boolean commit() throws LoginException
Method 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
login
method), then this method associates relevant Principals and Credentials with theSubject
located 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
LoginModule
should be ignored. - Throws:
LoginException
- if the commit fails
-
initialize
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
- Specified by:
initialize
in interfaceLoginModule
- Overrides:
initialize
in classorg.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule
-
abort
public boolean abort() throws LoginException
- Specified by:
abort
in interfaceLoginModule
- Overrides:
abort
in classorg.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule
- Throws:
LoginException
-
clearState
protected void clearState()
- Overrides:
clearState
in classorg.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule
-
-