Package org.gluu.oxauth.service
Class AuthenticationService
- java.lang.Object
-
- org.gluu.oxauth.service.AuthenticationService
-
@RequestScoped public class AuthenticationService extends java.lang.Object
Authentication service methods- Version:
- November 23, 2017
- Author:
- Yuriy Movchan, Javier Rojas Blum
-
-
Constructor Summary
Constructors Constructor Description AuthenticationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
authenticate(java.lang.String userName)
boolean
authenticate(java.lang.String userName, java.lang.String password)
Authenticate user.boolean
authenticate(java.lang.String nameValue, java.lang.String password, java.lang.String... nameAttributes)
Authenticate user.boolean
authenticate(java.lang.String keyValue, java.lang.String password, java.lang.String primaryKey, java.lang.String localPrimaryKey)
boolean
authenticate(org.gluu.model.ldap.GluuLdapConfiguration ldapAuthConfig, org.gluu.persist.PersistenceEntryManager ldapAuthEntryManager, java.lang.String keyValue, java.lang.String password, java.lang.String primaryKey, java.lang.String localPrimaryKey)
boolean
authenticate(org.gluu.model.ldap.GluuLdapConfiguration ldapAuthConfig, org.gluu.persist.PersistenceEntryManager ldapAuthEntryManager, java.lang.String keyValue, java.lang.String password, java.lang.String primaryKey, java.lang.String localPrimaryKey, boolean updateMetrics)
void
clearExternalScriptExtraParameters(java.util.Map<java.lang.String,java.lang.String> sessionIdAttributes)
SessionId
configureEventUser()
void
configureEventUser(SessionId sessionId)
Client
configureSessionClient()
void
configureSessionClient(Client client)
SessionId
configureSessionUser(SessionId sessionId, java.util.Map<java.lang.String,java.lang.String> sessionIdAttributes)
void
copyAuthenticatorExternalAttributes(SessionId oldSession, SessionId newSession)
User
getAuthenticatedUser()
java.lang.String
getAuthenticatedUserId()
java.util.Map<java.lang.String,java.lang.String>
getExternalScriptExtraParameters(java.util.Map<java.lang.String,java.lang.String> sessionIdAttributes)
java.util.Map<java.lang.String,java.lang.String>
getParametersMap(java.util.List<java.lang.String> extraParameters)
User
getUserOrRemoveSession(SessionId p_sessionId)
boolean
isParameterExists(java.lang.String p_name)
void
onSuccessfulLogin(SessionId sessionUser)
java.lang.String
parametersAsString()
void
quietLogin(java.lang.String userName)
void
setExternalScriptExtraParameters(java.util.Map<java.lang.String,java.lang.String> sessionIdAttributes, java.util.Map<java.lang.String,java.lang.String> authExternalAttributes)
void
updateExtraParameters(java.util.Map<java.lang.String,java.lang.String> sessionIdAttributes, java.util.List<java.lang.String> extraParameters)
-
-
-
Method Detail
-
authenticate
public boolean authenticate(java.lang.String userName, java.lang.String password)
Authenticate user.- Parameters:
userName
- The username.password
- The user's password.- Returns:
true
if success, otherwisefalse
.
-
authenticate
public boolean authenticate(java.lang.String nameValue, java.lang.String password, java.lang.String... nameAttributes)
Authenticate user.- Parameters:
nameValue
- The name value to find userpassword
- The user's password.nameAttributes
- List of attribute to search.- Returns:
true
if success, otherwisefalse
.
-
authenticate
public boolean authenticate(java.lang.String keyValue, java.lang.String password, java.lang.String primaryKey, java.lang.String localPrimaryKey)
-
authenticate
public boolean authenticate(org.gluu.model.ldap.GluuLdapConfiguration ldapAuthConfig, org.gluu.persist.PersistenceEntryManager ldapAuthEntryManager, java.lang.String keyValue, java.lang.String password, java.lang.String primaryKey, java.lang.String localPrimaryKey)
-
authenticate
public boolean authenticate(org.gluu.model.ldap.GluuLdapConfiguration ldapAuthConfig, org.gluu.persist.PersistenceEntryManager ldapAuthEntryManager, java.lang.String keyValue, java.lang.String password, java.lang.String primaryKey, java.lang.String localPrimaryKey, boolean updateMetrics)
-
authenticate
public boolean authenticate(java.lang.String userName)
-
configureSessionUser
public SessionId configureSessionUser(SessionId sessionId, java.util.Map<java.lang.String,java.lang.String> sessionIdAttributes)
-
configureEventUser
public SessionId configureEventUser()
-
configureEventUser
public void configureEventUser(SessionId sessionId)
-
quietLogin
public void quietLogin(java.lang.String userName)
-
getAuthenticatedUser
public User getAuthenticatedUser()
-
getAuthenticatedUserId
public java.lang.String getAuthenticatedUserId()
-
configureSessionClient
public Client configureSessionClient()
-
configureSessionClient
public void configureSessionClient(Client client)
-
onSuccessfulLogin
public void onSuccessfulLogin(SessionId sessionUser)
-
parametersAsString
public java.lang.String parametersAsString() throws java.io.UnsupportedEncodingException
- Throws:
java.io.UnsupportedEncodingException
-
getParametersMap
public java.util.Map<java.lang.String,java.lang.String> getParametersMap(java.util.List<java.lang.String> extraParameters)
-
isParameterExists
public boolean isParameterExists(java.lang.String p_name)
-
updateExtraParameters
public void updateExtraParameters(java.util.Map<java.lang.String,java.lang.String> sessionIdAttributes, java.util.List<java.lang.String> extraParameters)
-
getExternalScriptExtraParameters
public java.util.Map<java.lang.String,java.lang.String> getExternalScriptExtraParameters(java.util.Map<java.lang.String,java.lang.String> sessionIdAttributes)
-
setExternalScriptExtraParameters
public void setExternalScriptExtraParameters(java.util.Map<java.lang.String,java.lang.String> sessionIdAttributes, java.util.Map<java.lang.String,java.lang.String> authExternalAttributes)
-
clearExternalScriptExtraParameters
public void clearExternalScriptExtraParameters(java.util.Map<java.lang.String,java.lang.String> sessionIdAttributes)
-
-