Class AuthenticationService


  • @RequestScoped
    public class AuthenticationService
    extends Object
    Authentication service methods
    Version:
    November 23, 2017
    Author:
    Yuriy Movchan, Javier Rojas Blum
    • Constructor Detail

      • AuthenticationService

        public AuthenticationService()
    • Method Detail

      • authenticate

        public boolean authenticate​(String userName,
                                    String password)
        Authenticate user.
        Parameters:
        userName - The username.
        password - The user's password.
        Returns:
        true if success, otherwise false.
      • authenticate

        public boolean authenticate​(String nameValue,
                                    String password,
                                    String... nameAttributes)
        Authenticate user.
        Parameters:
        nameValue - The name value to find user
        password - The user's password.
        nameAttributes - List of attribute to search.
        Returns:
        true if success, otherwise false.
      • authenticate

        public boolean authenticate​(String keyValue,
                                    String password,
                                    String primaryKey,
                                    String localPrimaryKey)
      • authenticate

        public boolean authenticate​(io.jans.model.ldap.GluuLdapConfiguration ldapAuthConfig,
                                    io.jans.orm.PersistenceEntryManager ldapAuthEntryManager,
                                    String keyValue,
                                    String password,
                                    String primaryKey,
                                    String localPrimaryKey)
      • authenticate

        public boolean authenticate​(io.jans.model.ldap.GluuLdapConfiguration ldapAuthConfig,
                                    io.jans.orm.PersistenceEntryManager ldapAuthEntryManager,
                                    String keyValue,
                                    String password,
                                    String primaryKey,
                                    String localPrimaryKey,
                                    boolean updateMetrics)
      • authenticate

        public boolean authenticate​(String userName)
      • authenticateByUserInum

        public boolean authenticateByUserInum​(String userInum)
      • configureSessionUser

        public io.jans.as.common.model.session.SessionId configureSessionUser​(io.jans.as.common.model.session.SessionId sessionId,
                                                                              Map<String,​String> sessionIdAttributes)
      • configureEventUser

        public io.jans.as.common.model.session.SessionId configureEventUser()
      • configureEventUser

        public void configureEventUser​(io.jans.as.common.model.session.SessionId sessionId)
      • quietLogin

        public void quietLogin​(String userName)
      • getAuthenticatedUser

        public io.jans.as.common.model.common.User getAuthenticatedUser()
      • getAuthenticatedUserId

        public String getAuthenticatedUserId()
      • configureSessionClient

        public io.jans.as.common.model.registration.Client configureSessionClient()
      • configureSessionClient

        public void configureSessionClient​(io.jans.as.common.model.registration.Client client)
      • onSuccessfulLogin

        public void onSuccessfulLogin​(io.jans.as.common.model.session.SessionId sessionUser)
      • getUserOrRemoveSession

        public io.jans.as.common.model.common.User getUserOrRemoveSession​(io.jans.as.common.model.session.SessionId p_sessionId)
      • isParameterExists

        public boolean isParameterExists​(String p_name)
      • updateExtraParameters

        public void updateExtraParameters​(Map<String,​String> sessionIdAttributes,
                                          List<String> extraParameters)
      • setExternalScriptExtraParameters

        public void setExternalScriptExtraParameters​(Map<String,​String> sessionIdAttributes,
                                                     Map<String,​String> authExternalAttributes)
      • clearExternalScriptExtraParameters

        public void clearExternalScriptExtraParameters​(Map<String,​String> sessionIdAttributes)
      • copyAuthenticatorExternalAttributes

        public void copyAuthenticatorExternalAttributes​(io.jans.as.common.model.session.SessionId oldSession,
                                                        io.jans.as.common.model.session.SessionId newSession)