public class ScpCfUserFacade extends AbstractUserFacade
Modifier and Type | Field and Description |
---|---|
static String |
VARIABLE_ALLOW_MOCKED_AUTH_HEADER |
Constructor and Description |
---|
ScpCfUserFacade() |
Modifier and Type | Method and Description |
---|---|
protected Optional<User> |
getMockedUserAsFallback()
Returns a mocked
User as fallback, if the environment variable "ALLOW_MOCKED_AUTH_HEADER" is set to
"true". |
Optional<User> |
getUserByName(String name)
Returns a
User by its name, if it exists. |
Class<ScpCfUser> |
getUserClass()
Returns the platform-specific implementation class of
User . |
protected User |
newMockedUser()
Instantiates a mocked
User . |
Optional<User> |
resolveCurrentUser()
Resolves the current
User using the platform-specific lookup. |
getCurrentUser, getCurrentUserIfAuthenticated, getMockedUser
public static final String VARIABLE_ALLOW_MOCKED_AUTH_HEADER
@Nonnull public Class<ScpCfUser> getUserClass()
User
. For internal use only.@Nonnull protected User newMockedUser()
User
.newMockedUser
in class AbstractUserFacade
User
.@Nonnull protected Optional<User> getMockedUserAsFallback()
User
as fallback, if the environment variable "ALLOW_MOCKED_AUTH_HEADER" is set to
"true".User
.@Nonnull public Optional<User> resolveCurrentUser() throws UserAccessException
User
using the platform-specific lookup. For internal use only.
Caution: This method must only be invoked within the container-managed thread of a request.
Optional
of the current User
.UserAccessException
- If there is an issue while resolving the User
.UserRequestContextListener
Copyright © 2018 SAP SE. All rights reserved.