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 ornullif this application does not have such a user.booleansetAuthenticatedUser(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:UserServiceReturns the user that made this request ornullif this application does not have such a user.- Specified by:
resolvein interfaceUserService- Specified by:
resolvein classAbstractUserService- Parameters:
username- Username of the user a consumer is making a request on behalf of- Returns:
Principalcorresponding to the username,nullif the user does not exist
-
setAuthenticatedUser
Description copied from interface:UserServiceAuthenticate 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:
setAuthenticatedUserin interfaceUserService- Specified by:
setAuthenticatedUserin classAbstractUserService- Parameters:
username- the username of the user to authenticate- Returns:
- true if the username was correctly resolved and authenticated, false otherwise
-