Package io.jans.as.server.auth
Class Authenticator
- java.lang.Object
-
- io.jans.as.server.auth.Authenticator
-
@RequestScoped @Named public class Authenticator extends java.lang.Object
Authenticator component- Version:
- August 20, 2019
- Author:
- Javier Rojas Blum, Yuriy Movchan
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
AUTHENTICATION_ERROR_MESSAGE
static java.lang.String
AUTHENTICATION_SUCCESS_FOR_USER
static java.lang.String
INVALID_SESSION_MESSAGE
-
Constructor Summary
Constructors Constructor Description Authenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMessage(jakarta.faces.application.FacesMessage.Severity severity, java.lang.String summary)
boolean
authenticate()
Tries to authenticate an user, returnstrue
if the authentication succeedboolean
authenticateBySessionId(io.jans.as.common.model.session.SessionId sessionId)
boolean
authenticateBySessionId(java.lang.String sessionIdentifier)
boolean
authenticateClient(jakarta.servlet.http.HttpServletRequest servletRequest)
boolean
authenticateClient(jakarta.servlet.http.HttpServletRequest servletRequest, boolean skipPassword)
java.lang.String
authenticateImpl(jakarta.servlet.http.HttpServletRequest servletRequest, boolean interactive, boolean skipPassword, boolean service)
boolean
authenticateUser(jakarta.servlet.http.HttpServletRequest servletRequest)
java.lang.String
authenticateWithOutcome()
boolean
clientAuthentication(io.jans.model.security.Credentials credentials, boolean interactive, boolean skipPassword)
void
configureSessionClient(io.jans.as.common.model.registration.Client client)
java.lang.String
getMaskedNumber()
protected void
handleLoginError(java.lang.String facesMessageId)
protected void
handlePermissionsError()
protected void
handleScriptError()
protected void
handleScriptError(java.lang.String facesMessageId)
protected void
handleSessionInvalid()
boolean
isServiceAuthentication(boolean service, boolean skipPassword, jakarta.servlet.http.HttpServletRequest servletRequest)
java.lang.String
prepareAuthenticationForStep()
java.lang.String
prepareAuthenticationForStep(io.jans.as.common.model.session.SessionId sessionId)
-
-
-
Field Detail
-
INVALID_SESSION_MESSAGE
public static final java.lang.String INVALID_SESSION_MESSAGE
- See Also:
- Constant Field Values
-
AUTHENTICATION_ERROR_MESSAGE
public static final java.lang.String AUTHENTICATION_ERROR_MESSAGE
- See Also:
- Constant Field Values
-
AUTHENTICATION_SUCCESS_FOR_USER
public static final java.lang.String AUTHENTICATION_SUCCESS_FOR_USER
- See Also:
- Constant Field Values
-
-
Method Detail
-
authenticate
public boolean authenticate()
Tries to authenticate an user, returnstrue
if the authentication succeed- Returns:
- Returns
true
if the authentication succeed
-
authenticateWithOutcome
public java.lang.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 java.lang.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()
-
handleScriptError
protected void handleScriptError(java.lang.String facesMessageId)
-
handlePermissionsError
protected void handlePermissionsError()
-
handleLoginError
protected void handleLoginError(java.lang.String facesMessageId)
-
prepareAuthenticationForStep
public java.lang.String prepareAuthenticationForStep()
-
prepareAuthenticationForStep
public java.lang.String prepareAuthenticationForStep(io.jans.as.common.model.session.SessionId sessionId)
-
authenticateBySessionId
public boolean authenticateBySessionId(java.lang.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, java.lang.String summary)
-
getMaskedNumber
public java.lang.String getMaskedNumber()
-
-