Package io.jans.as.server.service
Class AuthenticationService
- java.lang.Object
-
- io.jans.as.server.service.AuthenticationService
-
@RequestScoped public class AuthenticationService extends 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(io.jans.model.ldap.GluuLdapConfiguration ldapAuthConfig, io.jans.orm.PersistenceEntryManager ldapAuthEntryManager, String keyValue, String password, String primaryKey, String localPrimaryKey)
boolean
authenticate(io.jans.model.ldap.GluuLdapConfiguration ldapAuthConfig, io.jans.orm.PersistenceEntryManager ldapAuthEntryManager, String keyValue, String password, String primaryKey, String localPrimaryKey, boolean updateMetrics)
boolean
authenticate(String userName)
boolean
authenticate(String userName, String password)
Authenticate user.boolean
authenticate(String nameValue, String password, String... nameAttributes)
Authenticate user.boolean
authenticateByUserInum(String userInum)
void
clearExternalScriptExtraParameters(Map<String,String> sessionIdAttributes)
io.jans.as.common.model.session.SessionId
configureEventUser()
void
configureEventUser(io.jans.as.common.model.session.SessionId sessionId)
io.jans.as.common.model.registration.Client
configureSessionClient()
void
configureSessionClient(io.jans.as.common.model.registration.Client client)
io.jans.as.common.model.session.SessionId
configureSessionUser(io.jans.as.common.model.session.SessionId sessionId, Map<String,String> sessionIdAttributes)
void
copyAuthenticatorExternalAttributes(io.jans.as.common.model.session.SessionId oldSession, io.jans.as.common.model.session.SessionId newSession)
boolean
externalAuthenticate(String keyValue, String password)
boolean
externalAuthenticate(String keyValue, String password, String primaryKey, String localPrimaryKey)
boolean
externalAuthenticate(List<io.jans.model.ldap.GluuLdapConfiguration> ldapAuthConfigs, List<io.jans.orm.PersistenceEntryManager> ldapAuthEntryManagers, String keyValue, String password)
io.jans.as.common.model.common.User
getAuthenticatedUser()
String
getAuthenticatedUserId()
Map<String,String>
getExternalScriptExtraParameters(Map<String,String> sessionIdAttributes)
Map<String,String>
getParametersMap(List<String> extraParameters)
io.jans.as.common.model.common.User
getUserOrRemoveSession(io.jans.as.common.model.session.SessionId p_sessionId)
boolean
isParameterExists(String p_name)
void
onSuccessfulLogin(io.jans.as.common.model.session.SessionId sessionUser)
String
parametersAsString()
void
quietLogin(String userName)
void
setExternalScriptExtraParameters(Map<String,String> sessionIdAttributes, Map<String,String> authExternalAttributes)
void
updateExtraParameters(Map<String,String> sessionIdAttributes, List<String> extraParameters)
-
-
-
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, otherwisefalse
.
-
authenticate
public boolean authenticate(String nameValue, String password, 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
.
-
externalAuthenticate
public boolean externalAuthenticate(List<io.jans.model.ldap.GluuLdapConfiguration> ldapAuthConfigs, List<io.jans.orm.PersistenceEntryManager> ldapAuthEntryManagers, String keyValue, String password)
-
externalAuthenticate
public boolean externalAuthenticate(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)
-
parametersAsString
public String parametersAsString() throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
isParameterExists
public boolean isParameterExists(String p_name)
-
updateExtraParameters
public void updateExtraParameters(Map<String,String> sessionIdAttributes, List<String> extraParameters)
-
getExternalScriptExtraParameters
public Map<String,String> getExternalScriptExtraParameters(Map<String,String> sessionIdAttributes)
-
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)
-
-