Package io.jans.as.server.auth
Class Authenticator
- java.lang.Object
-
- io.jans.as.server.auth.Authenticator
-
@RequestScoped @Named public class Authenticator extends Object
Authenticator component- Version:
- August 20, 2019
- Author:
- Javier Rojas Blum, Yuriy Movchan
-
-
Field Summary
Fields Modifier and Type Field Description static StringAUTHENTICATION_ERROR_MESSAGEstatic StringAUTHENTICATION_SUCCESS_FOR_USERstatic StringINVALID_SESSION_MESSAGE
-
Constructor Summary
Constructors Constructor Description Authenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMessage(jakarta.faces.application.FacesMessage.Severity severity, String summary)booleanauthenticate()Tries to authenticate an user, returnstrueif the authentication succeedbooleanauthenticateBySessionId(io.jans.as.common.model.session.SessionId sessionId)booleanauthenticateBySessionId(String sessionIdentifier)booleanauthenticateClient(jakarta.servlet.http.HttpServletRequest servletRequest)booleanauthenticateClient(jakarta.servlet.http.HttpServletRequest servletRequest, boolean skipPassword)StringauthenticateImpl(jakarta.servlet.http.HttpServletRequest servletRequest, boolean interactive, boolean skipPassword, boolean service)booleanauthenticateUser(jakarta.servlet.http.HttpServletRequest servletRequest)StringauthenticateWithOutcome()booleanclientAuthentication(io.jans.model.security.Credentials credentials, boolean interactive, boolean skipPassword)voidconfigureSessionClient(io.jans.as.common.model.registration.Client client)StringgetMaskedNumber()protected voidhandleLoginError(String facesMessageId)protected voidhandlePermissionsError()protected voidhandleScriptError(io.jans.as.common.model.session.SessionId sessionId)protected voidhandleScriptError(io.jans.as.common.model.session.SessionId sessionId, String facesMessageId)protected voidhandleSessionInvalid()booleanisServiceAuthentication(boolean service, boolean skipPassword, jakarta.servlet.http.HttpServletRequest servletRequest)StringprepareAuthenticationForStep()StringprepareAuthenticationForStep(io.jans.as.common.model.session.SessionId sessionId)
-
-
-
Field Detail
-
INVALID_SESSION_MESSAGE
public static final String INVALID_SESSION_MESSAGE
- See Also:
- Constant Field Values
-
AUTHENTICATION_ERROR_MESSAGE
public static final String AUTHENTICATION_ERROR_MESSAGE
- See Also:
- Constant Field Values
-
AUTHENTICATION_SUCCESS_FOR_USER
public static final String AUTHENTICATION_SUCCESS_FOR_USER
- See Also:
- Constant Field Values
-
-
Method Detail
-
authenticate
public boolean authenticate()
Tries to authenticate an user, returnstrueif the authentication succeed- Returns:
- Returns
trueif the authentication succeed
-
authenticateWithOutcome
public String authenticateWithOutcome()
-
authenticateClient
public boolean authenticateClient(jakarta.servlet.http.HttpServletRequest servletRequest, boolean skipPassword)
-
authenticateClient
public boolean authenticateClient(jakarta.servlet.http.HttpServletRequest servletRequest)
-
authenticateUser
public boolean authenticateUser(jakarta.servlet.http.HttpServletRequest servletRequest)
-
isServiceAuthentication
public boolean isServiceAuthentication(boolean service, boolean skipPassword, jakarta.servlet.http.HttpServletRequest servletRequest)
-
authenticateImpl
public String authenticateImpl(jakarta.servlet.http.HttpServletRequest servletRequest, boolean interactive, boolean skipPassword, boolean service)
-
clientAuthentication
public boolean clientAuthentication(io.jans.model.security.Credentials credentials, boolean interactive, boolean skipPassword)
-
handleSessionInvalid
protected void handleSessionInvalid()
-
handleScriptError
protected void handleScriptError(io.jans.as.common.model.session.SessionId sessionId)
-
handleScriptError
protected void handleScriptError(io.jans.as.common.model.session.SessionId sessionId, String facesMessageId)
-
handlePermissionsError
protected void handlePermissionsError()
-
handleLoginError
protected void handleLoginError(String facesMessageId)
-
prepareAuthenticationForStep
public String prepareAuthenticationForStep()
-
prepareAuthenticationForStep
public String prepareAuthenticationForStep(io.jans.as.common.model.session.SessionId sessionId)
-
authenticateBySessionId
public boolean authenticateBySessionId(String sessionIdentifier)
-
authenticateBySessionId
public boolean authenticateBySessionId(io.jans.as.common.model.session.SessionId sessionId)
-
configureSessionClient
public void configureSessionClient(io.jans.as.common.model.registration.Client client)
-
addMessage
public void addMessage(jakarta.faces.application.FacesMessage.Severity severity, String summary)
-
getMaskedNumber
public String getMaskedNumber()
-
-