public interface UserService
Modifier and Type | Method and Description |
---|---|
boolean |
authenticate(String username,
String password)
Given a username and password, this method checks, whether or not the provided user can
be authenticated
|
String |
getAuthenticatedUsername(javax.servlet.http.HttpServletRequest request)
Returns the username of the currently logged in user or null if no user can be found.
|
boolean |
isAdmin(String username)
Returns true or false depending on if a user has been granted the admin or sysAdmin permission within Crowd.
|
boolean |
isSystemAdmin(String username)
Returns true or false depending on if a user has been granted the sysAdmin permission within Crowd.
|
boolean |
isUserInGroup(String username,
String group)
Returns whether the user is in the specify group
|
Principal |
resolve(String username)
Returns the user that made this request or
null if this application does not have such a user. |
boolean |
setAuthenticatedUser(String username)
Authenticate the current user by setting an appropriate authentication token in Spring Security's SecurityContext.
|
@Nullable String getAuthenticatedUsername(javax.servlet.http.HttpServletRequest request)
request
- The request to retrieve the username fromboolean isUserInGroup(String username, String group)
username
- The username to checkgroup
- The group to checkboolean isSystemAdmin(String username)
username
- The username of the user to checkboolean isAdmin(String username)
username
- The username of the user to checkboolean authenticate(String username, String password)
username
- Username of the userpassword
- Password of the userPrincipal resolve(String username) throws CrowdRuntimeException
null
if this application does not have such a user.username
- Username of the user a consumer is making a request on behalf ofPrincipal
corresponding to the username, null
if the user does not existCrowdRuntimeException
- if there was an error retrieving the usernameboolean setAuthenticatedUser(String username)
username
- the username of the user to authenticateCopyright © 2021 Atlassian. All rights reserved.