public class ScpCfUserFacade extends Object implements UserFacade
Constructor and Description |
---|
ScpCfUserFacade() |
Modifier and Type | Method and Description |
---|---|
User |
getCurrentUser()
Returns the current
User . |
com.google.common.base.Optional<User> |
getUserByName(String name)
Returns the current
User by its name, if it exists. |
ScpCfUser |
lookupCurrentUser()
Retrieves the current user from the JWT bearer in the Authorization header of the current request.
|
public ScpCfUser lookupCurrentUser() throws UserNotAuthenticatedException, UserAccessException
UserNotAuthenticatedException
- If the current is user not authenticated.UserAccessException
- If there is an issue while retrieving the user.public User getCurrentUser() throws UserNotAuthenticatedException
User
.getCurrentUser
in interface UserFacade
UserNotAuthenticatedException
- If the current User
is not authenticated.public com.google.common.base.Optional<User> getUserByName(String name)
User
by its name, if it exists.getUserByName
in interface UserFacade
name
- The name of the user to find.Copyright © 2018 SAP SE. All rights reserved.