@ApplicationScoped public class AuthenticationServiceImpl extends Object implements AuthenticationService
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_AUTH_PROVIDER_NAMED |
Constructor and Description |
---|
AuthenticationServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addUserRole(String login,
String role)
Add the role with the given name to the user with the given login.
|
boolean |
authenticateUser(String login,
String password)
Authenticate the user with the given login and password.
|
protected void |
initialize() |
Set<String> |
listAuthProviderNames()
Returns a list of available
AuthenticationProvider names. |
Set<String> |
listUserRoles(String login)
Return the roles that are assigned to the user (a list of strings that can be chosen by the administrator as
needed).
|
protected void |
onConfigurationChange(org.apache.marmotta.platform.core.events.ConfigurationChangedEvent event) |
void |
removeUserRole(String login,
String role)
Remove the role with the given name from the user with the given login.
|
void |
setUserPassword(String login,
String password)
Change the password of the user with the given login to the given new password.
|
public static final String DEFAULT_AUTH_PROVIDER_NAMED
@PostConstruct protected void initialize()
protected void onConfigurationChange(@Observes org.apache.marmotta.platform.core.events.ConfigurationChangedEvent event)
public Set<String> listAuthProviderNames()
AuthenticationService
AuthenticationProvider
names.listAuthProviderNames
in interface AuthenticationService
public boolean authenticateUser(String login, String password)
authenticateUser
in interface AuthenticationService
login
- login of the user to authenticatepassword
- password of the user to authenticatepublic void setUserPassword(String login, String password)
setUserPassword
in interface AuthenticationService
login
- password
- public Set<String> listUserRoles(String login)
listUserRoles
in interface AuthenticationService
login
- login name of the user for whom to return the rolespublic void addUserRole(String login, String role)
addUserRole
in interface AuthenticationService
login
- the login name of the user with whom to associate rolesrole
- the role name to associate with the userpublic void removeUserRole(String login, String role)
removeUserRole
in interface AuthenticationService
login
- the login name of the user from whom to remove the rolerole
- the role name to remove from the list of roles of the userCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.