Package com.atlassian.crowd.service
Class UserServiceImpl
java.lang.Object
com.atlassian.crowd.service.AbstractUserService
com.atlassian.crowd.service.UserServiceImpl
- All Implemented Interfaces:
UserService
-
Field Summary
Fields inherited from class com.atlassian.crowd.service.AbstractUserService
applicationService, authenticatedUserProvider, internalApplicationHelper, tokenAuthenticationManager, userPermissionService
-
Constructor Summary
ConstructorsConstructorDescriptionUserServiceImpl
(InternalApplicationHelper internalApplicationHelper, ApplicationService applicationService, TokenAuthenticationManager tokenAuthenticationManager, UserPermissionService userPermissionService, AuthenticatedUserProvider authenticatedUserProvider, ApplicationFactory applicationFactory, UserAuthoritiesProvider userAuthoritiesProvider) -
Method Summary
Modifier and TypeMethodDescriptionReturns the user that made this request ornull
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.Methods inherited from class com.atlassian.crowd.service.AbstractUserService
authenticate, getAuthenticatedUsername, isSystemAdmin, isUserInGroup
-
Constructor Details
-
UserServiceImpl
public UserServiceImpl(InternalApplicationHelper internalApplicationHelper, ApplicationService applicationService, TokenAuthenticationManager tokenAuthenticationManager, UserPermissionService userPermissionService, AuthenticatedUserProvider authenticatedUserProvider, ApplicationFactory applicationFactory, UserAuthoritiesProvider userAuthoritiesProvider)
-
-
Method Details
-
resolve
Description copied from interface:UserService
Returns the user that made this request ornull
if this application does not have such a user.- Specified by:
resolve
in interfaceUserService
- Specified by:
resolve
in classAbstractUserService
- Parameters:
username
- Username of the user a consumer is making a request on behalf of- Returns:
Principal
corresponding to the username,null
if the user does not exist
-
setAuthenticatedUser
Description copied from interface:UserService
Authenticate the current user by setting an appropriate authentication token in Spring Security's SecurityContext. This method should only be called if the user has been authenticated via some other mean (e.g OAuth or Trusted Apps).- Specified by:
setAuthenticatedUser
in interfaceUserService
- Specified by:
setAuthenticatedUser
in classAbstractUserService
- Parameters:
username
- the username of the user to authenticate- Returns:
- true if the username was correctly resolved and authenticated, false otherwise
-