*** This interface provides Binary Compatibility only, not Source Compatibility ***
Package com.sas.services.user
Interface UserContextInterface
- All Superinterfaces:
com.sas.metadata.remote.CredentialResolver,Remote
- All Known Implementing Classes:
UserContext
@SASScope("ALL")
@BinaryCompatibilityOnly
public interface UserContextInterface
extends com.sas.metadata.remote.CredentialResolver
The UserContextInterface provides a mechanism for maintaining
information about a user entity. The user authentication
identities, and access to the user profile are provided from
here, as well as a list of repositories that the user is
connected to.
- Since:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName of SSPI ID propagation mechanism.static final StringName of Trusted Peer ID propagation mechanism.static final StringThe internal authentication domain that will be set on an identity if the resolved domain matches the internal authenticator domain from the server.static final StringKey for an environment object in the shared resource map.static final String -
Method Summary
Modifier and TypeMethodDescriptionvoidaddException(Exception exception) Add an exception to the list.voidaddIdentity(UserIdentityInterface identity) Add an identity to the context.voidaddRepository(Object repository) Add a repository to this user context.voidAdd a repository group to this UserContext.voidaddServer(ServerInterface server) Add a server to the list that this user is connected to.voidaddUserIdentityListener(UserIdentityListener listener) booleanAuthenticate a user based on their current OS identity.booleanauthenticate(UserIdentityInterface ident, Map options) Authenticates a user identity.voidClear the exception list.voiddestroy()Destroy the user context.voidenableLocalAdminMode(String authDomain) This sets up a special case where an administrative user with an internal account is used to authenticate a user.ListgetActions(String appName) Get a List of actions associated with an application that this user can perform.ListgetActions(String appName, boolean onlyGrantedActions) Get a List of actions associated with an application.StringGet the name of the application that initiated the login request for this UserContext.Deprecated.Use getAuthServer instead.StringDeprecated.Use getAuthServerName instead.Get a handle to the metadata server the user authenticated against.StringGet the definition name of the server the user authenticated against.Get the object that will handle credential challenge callbacks.StringGet the client location idetifier where the login request originated.StringGet the common description for this user.Exception[]Get an array of exceptions that have occurred since the last time they were cleared.Map<String, ApplicationAuthorization> getGrantedApplicationActions(String... applicationName) Returns a map of actions granted to the user for the specified application(s).ListGet a List of the groups this user is a member of.ListGet an iterator of UserIdentityInterface objects that represent the currently available authentication identities for the user.ListgetIdentitiesByDomain(String domain, boolean issueChallenge, String challengePrompt) This method returns a list of all the credential sets that are available for the requested domain.getIdentityByDomain(String domain) Get an authentication identity for the given domain.getIdentityByDomain(String domain, boolean issueChallenge) Get an identity by domain.getIdentityByDomain(String domain, boolean issueChallenge, String challengePrompt) Get an identity by domain.StringIf the UserContext was authenticated using an ID propagation mechanism such as SSPI, the name of the ID propagation mechanism is returned.StringgetKey()Get the user key.LocaleGet the locale for this user.Get the callback handler.longGet the timestamp when the user was authenticated.StringgetName()Get the name of this user.Return the IdentityInterface object that represents this user.StringGet the FQID of the authenticated Identity.SetGets the set of principals.SetGets the set of private credentials.Get the user's profile set.SetGets the set of public credentials.ListGet a List of the repositories this user is connected to.getRepository(String name) Get a repository based on the name.getRepositoryGroup(String name) Get a repository group from this UserContext.StringReturn the metadata server resolved user id.ListgetRoles()Get a List of the roles this user is a member of.getServer(String name) Get a specific named Information Service server from this user.ListGet a List of the servers this user is connected to.Get the session context for this user.ObjectgetSharedResource(String key) Get an object from the shared resource map.StringReturns a unique identifier for this object.booleanhasCapability(String appName, String action) Check whether this user has the capability to perform a specific action for a particular application.booleanReturn true if this User Context has been destroyed, or is in the process of being destroyed.booleanisInAnyGroup(List groupList) Check whether the user is a member of any of the groups in the list.booleanisInAnyRole(List roleList) Check whether the user is a member of any of the roles in the list.booleanisInGroup(String group) Check whether the user is a member of a given group.booleanisInRole(String role) Check whether the user is a member of a given role.booleanReturn a boolean indicating if this user was created using an internal userid.ObjectputSharedResource(String key, Object value) Put an object into the shared resource map.voidRefresh all of the data that's been retrieved using the Information Service during the life of this UserContext.voidremoveIdentity(UserIdentityInterface identity) Remove an identity from the context.voidremoveRepository(Object repository) Remove a repository from this context.voidRemove a repository group from this UserContext.voidremoveServer(ServerInterface server) Remove a server from the list that this user is currently connected to.voidsetAppSource(String source) Set the application source identifier that initiated the logon request for this UserContext.voidSet the object that will be used to handle credential challenge callbacks.voidsetClientSource(String source) Set the source location identifier for this UserContext.voidsetKey(String key) Set the user key.voidsetLocale(Locale locale) Set the locale to use for this user session.voidsetName(String name) Set the name of the user.voidsetPerson(IdentityInterface identity) This method gets called by UserService as part of the UserContext initialization.voidsetSessionContext(SessionContextInterface session) Set the session context that this user context will use for logging, etc.byte[]Methods inherited from interface com.sas.metadata.remote.CredentialResolver
requestCredentialList, requestCredentials
-
Field Details
-
SHAREDRESOURCEKEY_ENVIRONMENT
static final String SHAREDRESOURCEKEY_ENVIRONMENTKey for an environment object in the shared resource map. An environment object encapsulates resources provided by the container.- See Also:
-
SHAREDRESOURCEKEY_SERVICEID
static final String SHAREDRESOURCEKEY_SERVICEID- See Also:
-
IDPROPAGATION_SSPI
static final String IDPROPAGATION_SSPIName of SSPI ID propagation mechanism.- See Also:
-
IDPROPAGATION_TRUSTED_PEER
static final String IDPROPAGATION_TRUSTED_PEERName of Trusted Peer ID propagation mechanism.- See Also:
-
INTERNAL_AUTH_DOMAIN
static final String INTERNAL_AUTH_DOMAINThe internal authentication domain that will be set on an identity if the resolved domain matches the internal authenticator domain from the server.- See Also:
-
-
Method Details
-
setSessionContext
Set the session context that this user context will use for logging, etc.- Parameters:
session- The session context.- Throws:
RemoteException- in the event of network failure.
-
getSessionContext
Get the session context for this user.- Returns:
- The session context.
- Throws:
RemoteException- in the event of network failure.
-
getPersonFQID
String getPersonFQID() throws RemoteExceptionGet the FQID of the authenticated Identity. This may actually be a Person or an IdentityGroup, if group logins are enabled.- Returns:
- The FQID of the authenticated user.
- Throws:
RemoteException- In the event of remote object failure.
-
getName
String getName() throws RemoteExceptionGet the name of this user. The name can be any String which represents the entity. This may be set by the application, or by a login module, if it can determine the name during the authentication process.- Returns:
- The user name;
- Throws:
RemoteException- in the event of network problems.
-
setName
void setName(String name) throws RemoteException Set the name of the user. The name can be any String which represents the user. It should be the name by which the user is commonly known.- Parameters:
name- The user name.- Throws:
RemoteException- in the event of network problems.
-
getDescription
String getDescription() throws RemoteExceptionGet the common description for this user. This should come from the repository that the user's global profile is defined in. As a fallback, it will get the description from the primary authentication repository (in case they're different).- Returns:
- A String with a description of the user.
- Throws:
RemoteException- in the event of remote object failure.
-
getKey
String getKey() throws RemoteExceptionGet the user key. This is probably a user ID, a UUID, or some other unique identitfier for this user. Since names aren't always unique, this is necessary to uniquely locate a user context from the user service.- Returns:
- A unique identifier for this user.
- Throws:
RemoteException- in the event of network problems.
-
setKey
void setKey(String key) throws RemoteException Set the user key. This should be unique within the context of the user service. If this isn't set, the name is used to store this user with the UserServices, which may cause conflicts. Setting this before adding to the UserService is strongly recommended.- Parameters:
key- The key that identifies this user.- Throws:
RemoteException- in the event of network problems.
-
getClientSource
String getClientSource() throws RemoteExceptionGet the client location idetifier where the login request originated.- Returns:
- The client identifier (usually a TCP/IP address) where the login request originated for this UserContext.
- Throws:
RemoteException- In the event of remote object failure.
-
setClientSource
void setClientSource(String source) throws RemoteException Set the source location identifier for this UserContext.- Parameters:
source- The source location identifier (usually a TCP/IP address).- Throws:
RemoteException- In the event of remote object failure.
-
getAppSource
String getAppSource() throws RemoteExceptionGet the name of the application that initiated the login request for this UserContext.- Returns:
- The application source identifier.
- Throws:
RemoteException- In the event of remote object failure.
-
setAppSource
void setAppSource(String source) throws RemoteException Set the application source identifier that initiated the logon request for this UserContext.- Parameters:
source- The application source that requested the creation of the UserContext. This is usualy either the main Java class name, or an identifiable application name.- Throws:
RemoteException- In the event of remote object failure.
-
getIDPropagation
If the UserContext was authenticated using an ID propagation mechanism such as SSPI, the name of the ID propagation mechanism is returned. Otherwise,nullis returned- Returns:
- the name of the ID propagation mechanism used to authenticate this UserContext, if any.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.- See Also:
-
addIdentity
Add an identity to the context. Identities are credential sets used to authenticate a user to a specific security domain. The UserService can be used to create a new identity, or to look up indentities that may be stored in a repository.- Parameters:
identity- The new identity for this user.- Throws:
RemoteException- in the event of network problems.
-
removeIdentity
Remove an identity from the context.- Parameters:
identity- The identity to remove.- Throws:
RemoteException- In the event of network object failure.
-
getIdentities
List getIdentities() throws RemoteExceptionGet an iterator of UserIdentityInterface objects that represent the currently available authentication identities for the user. If the current user (as set by a call to Subject.doAs() ) is different from the Subject in the local LoginContext, the user must have the CredentialPermission "readCredential" granted to perform this operation.- Returns:
- An Iterator of UserIdentityInterface objects.
- Throws:
RemoteException- in the event of network problems.
-
getIdentityByDomain
Get an authentication identity for the given domain. If the current user (as set by a call to Subject.doAs() ) is different from the Subject in the local LoginContext, the user must have the CredentialPermission "readCredential" granted to perform this operation.- Parameters:
domain- The domain for which to retrieve an identity.- Returns:
- The user identity, or null if none is found.
- Throws:
RemoteException- in the event of network problems.
-
getIdentityByDomain
UserIdentityInterface getIdentityByDomain(String domain, boolean issueChallenge) throws RemoteException, ServiceException Get an identity by domain.- Parameters:
domain- The domain to search for in the identities.issueChallenge- If true, the callback handler set in the User Service will be used to challenge the user to provide the requested credentials.- Returns:
- An identity matching the domain requested.
- Throws:
RemoteException- in the event of network problems.ServiceException- if unable to obtain the identity by domain.
-
getIdentityByDomain
UserIdentityInterface getIdentityByDomain(String domain, boolean issueChallenge, String challengePrompt) throws RemoteException, ServiceException Get an identity by domain.- Parameters:
domain- The domain to search for in the identities.issueChallenge- If true, the callback handler set in the User Service will be used to challenge the user to provide the requested credentials.challengePrompt- A string to present to the user to get the desired credentials.- Returns:
- An identity matching the domain requested.
- Throws:
RemoteException- in the event of network problems.ServiceException- if unable to obtain the identity by domain.
-
getIdentitiesByDomain
List getIdentitiesByDomain(String domain, boolean issueChallenge, String challengePrompt) throws RemoteException, ServiceException This method returns a list of all the credential sets that are available for the requested domain.- Parameters:
domain- The Authentication Domain to get credentials for.issueChallenge- If true, if the user currently doesn't have credentials for the requested authentication domain, a challenge is issued back to the user for them.challengePrompt- A string to present to the user with the challenge.- Returns:
- A List of UserIdentityInterface objects with the credential sets for the requested domain.
- Throws:
RemoteException- if the event of remote object failure.ServiceException- if a service error occurs.
-
addRepositoryGroup
Add a repository group to this UserContext. A repository group is a list of names of repositories to use for a search. They need not all be the same type of repository. That is, you may have OMR repositories and DAV repositories in the same group, if it makes sense to search both for some types of data. The group must have a name (non-null, and one or more characters), and must be unique for the groups managed by this UserContext. To perform a search using a group, callInformationServiceInterface.searchGroupName(UserContextInterface, String, com.sas.services.information.FilterInterface), orInformationServiceInterface.searchGroupNameWithFilterArray(UserContextInterface, String, com.sas.services.information.FilterInterface[]).- Parameters:
group- The repository group to add.- Throws:
ServiceException- If the group name is null, or if a group with the same name already exists in the UserContext.RemoteException- In the event of remote object failure.
-
removeRepositoryGroup
Remove a repository group from this UserContext.- Parameters:
group- The Group to remove.- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getRepositoryGroup
Get a repository group from this UserContext. To perform a search using the returned group, callInformationServiceInterface.searchGroup(UserContextInterface, com.sas.services.information.RepositoryGroup, com.sas.services.information.FilterInterface), orInformationServiceInterface.searchGroupWithFilterArray(UserContextInterface, com.sas.services.information.RepositoryGroup, com.sas.services.information.FilterInterface[]).- Parameters:
name- The name of the group to return.- Returns:
- The repository group specfied by name, or null if one by that name doesn't exist.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getProfile
Get the user's profile set.- Returns:
- a ProfileInterface for the user's profile instance.
- Throws:
RemoteException- In the event of a remote failure.
-
addRepository
void addRepository(Object repository) throws RemoteException Add a repository to this user context.- Parameters:
repository- A connected repository that uses an identity for this user- Throws:
RemoteException- In the event of a remote failure.
-
removeRepository
void removeRepository(Object repository) throws RemoteException Remove a repository from this context.- Parameters:
repository- The repository to remove from this context.- Throws:
RemoteException- In the event of a remote failure.
-
getRepository
Get a repository based on the name. In order for this to work, the name has to be defined in the Information Service as a ReposDef. If it's not, or if the user isn't connected to the requested repository, this will return null.- Parameters:
name- The name of the repository to return the handle to.- Returns:
- The repository handle for the named repository, or null.
- Throws:
ServiceException- in the event of a service failure.RemoteException- in the event of a network failure.
-
getAuthRepository
Deprecated.Use getAuthServer instead.Get a handle to the repository the user authenticated against. It's possible for a configuration to authenticate against multiple services. This will return the first server that was used to authenticate the user.- Returns:
- The RepositoryInterface used for authentication.
- Throws:
ServiceException- in the event of a service failure.RemoteException- in the event of a network failure.
-
getAuthRepositoryName
Deprecated.Use getAuthServerName instead.Get the Information Service configured name of the repository that was used for authentication. It's possible for a configuration to authenticate against multiple services. This will return the first server that was used to authenticate the user.- Returns:
- The name of the repository that was used for authentication.
- Throws:
ServiceException- in the event of a service failure.RemoteException- in the event of a network failure.
-
getAuthServer
Get a handle to the metadata server the user authenticated against.- Returns:
- The ServerInterface that the user authenticated against.
- Throws:
ServiceException- If a server error occurs.RemoteException- In the event of remote object failure.
-
getAuthServerName
Get the definition name of the server the user authenticated against.- Returns:
- The Information Service configured Server definition name of the server that the user authenticated against.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getRepositories
List getRepositories() throws RemoteExceptionGet a List of the repositories this user is connected to.- Returns:
- The connected repositories
- Throws:
RemoteException- In the event of a remote failure.
-
getServers
List getServers() throws RemoteExceptionGet a List of the servers this user is connected to.- Returns:
- A List of
ServerInterfaceobjects this user has connections to. - Throws:
RemoteException- In the event of remote object failure.
-
addServer
Add a server to the list that this user is connected to.- Parameters:
server- A server to which this user has an active connection.- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
removeServer
Remove a server from the list that this user is currently connected to.- Parameters:
server- The server to remove from the active list.- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getServer
Get a specific named Information Service server from this user.- Parameters:
name- The configured name of the server to get from the connected list.- Returns:
- The
ServerInterfacewith the requested name, or null if it's not connected. - Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getPrincipals
Set getPrincipals() throws RemoteExceptionGets the set of principals.- Returns:
- Set containing principals.
- Throws:
RemoteException- In the event of a remote failure.
-
getPublicCredentials
Set getPublicCredentials() throws RemoteExceptionGets the set of public credentials.- Returns:
- Set containing public credentials.
- Throws:
RemoteException- In the event of a remote failure.
-
getPrivateCredentials
Set getPrivateCredentials() throws RemoteExceptionGets the set of private credentials.- Returns:
- Set containing private credentials.
- Throws:
RemoteException- In the event of a remote failure.
-
getLoginCallback
Get the callback handler. This is used by the Authenticator class to set information needed by the login modules to perform the authenticaton.- Returns:
- Login callback handler.
- Throws:
RemoteException- In the event of a remote failure.
-
authenticate
boolean authenticate() throws RemoteExceptionAuthenticate a user based on their current OS identity.- Returns:
- true if the authentication was successful, false otherwise.
- Throws:
RemoteException- In the event of remote object failure.
-
authenticate
Authenticates a user identity.- Parameters:
ident- The identity to authenticate.options- Additional options for the authentication process (this may include a host and port for an authentication server and other information).- Returns:
- true if the authentication was successful, false otherwise.
- Throws:
RemoteException- In the event of a remote failure.
-
destroy
void destroy() throws RemoteExceptionDestroy the user context. Release all resources in use.- Throws:
RemoteException- In the event of a remote failure.
-
addException
void addException(Exception exception) throws RemoteException Add an exception to the list.- Parameters:
exception- Exception to be added to the list.- Throws:
RemoteException- In the event of a remote failure.
-
clearExceptions
void clearExceptions() throws RemoteExceptionClear the exception list.- Throws:
RemoteException- In the event of a remote failure.
-
getExceptions
Exception[] getExceptions() throws RemoteExceptionGet an array of exceptions that have occurred since the last time they were cleared.- Returns:
- an array of Exceptions, or null if there have been none.
- Throws:
RemoteException- In the event of a remote failure.
-
setChallengeCallbackHandler
Set the object that will be used to handle credential challenge callbacks.- Parameters:
handler- The credential callback handler. This object will have to be an implementation of the javax.security.auth.callback.CallbackHandler interface.- Throws:
RemoteException- In the event of a remote failure.
-
getChallengeCallbackHandler
Get the object that will handle credential challenge callbacks.- Returns:
- The callback handler
- Throws:
RemoteException- In the event of a remote failure.
-
getPerson
Return the IdentityInterface object that represents this user. This is the metadata object that the metadata server has determined represents the authenticated user. It may a PersonInterface or an IdentityGroupInterface object, if group logins are enabled in the UserService.- Returns:
- An IdentityInterface representing this user, or null if the authenticated user has no metadata presence (a public user).
- Throws:
RemoteException- in the event of remote object failure.
-
setPerson
This method gets called by UserService as part of the UserContext initialization. Client code should not call this method.- Parameters:
identity- The Person object that represents the user.- Throws:
RemoteException- In the event of remote object failure.IllegalStateException- If the identity object has already been set.
-
getUniqueId
String getUniqueId() throws RemoteExceptionReturns a unique identifier for this object.- Returns:
- A String with a unique identifier. This is a per-instance identifier.
- Throws:
RemoteException- in the event of remote object failure.
-
isDestroyed
boolean isDestroyed() throws RemoteExceptionReturn true if this User Context has been destroyed, or is in the process of being destroyed.- Returns:
- true if this context has been destroyed.
- Throws:
RemoteException- in the event of remote object failure.
-
getLoginTime
long getLoginTime() throws RemoteExceptionGet the timestamp when the user was authenticated.- Returns:
- A long representing the login date/time.
- Throws:
RemoteException- In the event of remote object failure.
-
toByteArray
byte[] toByteArray() throws RemoteException- Throws:
RemoteException
-
addUserIdentityListener
- Throws:
RemoteException
-
isInRole
Check whether the user is a member of a given role.- Parameters:
role- The role name to check for.- Returns:
- True if the user is a member of the role. False otherwise.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
isInAnyRole
Check whether the user is a member of any of the roles in the list.- Parameters:
roleList- A List of Strings representing role names.- Returns:
- True if the user is a member of any roles in the list. False otherwise.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getRoles
Get a List of the roles this user is a member of.- Returns:
- A List of Strings representing the role names this user is a member of.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
hasCapability
Check whether this user has the capability to perform a specific action for a particular application.- Parameters:
appName- The SoftwareComponent name associated with the application.action- The action to perform.- Returns:
- True if the user has permission to perform the action; otherwise, false.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getActions
Get a List of actions associated with an application that this user can perform.Note:
getGrantedApplicationActions(String...)is recommended instead of this method.- Parameters:
appName- The SoftwareComponent name associated with the application.- Returns:
- A List of ApplicationAuthorizations representing the actions.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getActions
List getActions(String appName, boolean onlyGrantedActions) throws ServiceException, RemoteException Get a List of actions associated with an application.Note: Use
getGrantedApplicationActions(String...)(for granted actions) orApplicationInterface.getActions()(for all actions) instead of this method.- Parameters:
appName- The SoftwareComponent name associated with the application.onlyGrantedActions- If true then return only the actions that are granted to this user; otherwise, return all actions.- Returns:
- A List of ApplicationAuthorizations representing the actions.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getGrantedApplicationActions
Map<String,ApplicationAuthorization> getGrantedApplicationActions(String... applicationName) throws ServiceException, RemoteException Returns a map of actions granted to the user for the specified application(s). The map is keyed by application action identifier. If multiple applications are specified all applications are scanned for granted actions. If the same action identifier is defined for multiple application, only the first granted action will be returned.- Parameters:
applicationName- one or more application names- Returns:
- a map of actions granted to the user for the specified application(s)
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
isInGroup
Check whether the user is a member of a given group.- Parameters:
group- The group name to check for.- Returns:
- True if the user is a member of the group. False otherwise.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
isInAnyGroup
Check whether the user is a member of any of the groups in the list.- Parameters:
groupList- A List of Strings representing group names.- Returns:
- True if the user is a member of any groups in the list. False otherwise.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getGroups
Get a List of the groups this user is a member of.- Returns:
- A List of Strings representing the group names this user is a member of.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
refreshRepositoryData
Refresh all of the data that's been retrieved using the Information Service during the life of this UserContext. This is potentially a very expensive operation, so use it with care.- Throws:
ServiceException- If an exception occurs during the refresh operation.RemoteException- In the event of remote object failure.
-
getResolvedUserId
Return the metadata server resolved user id.- Returns:
- the user id as resolved by the metadata server. This is a domain-qualified user id (e.g., user@DefaultAuth).
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
isInternalUser
Return a boolean indicating if this user was created using an internal userid.- Returns:
- true if the user was created using an internal userid, false otherwise.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
getLocale
Get the locale for this user. If it has been set explicitly, return that value. If the user has a profile, return the profile setting. If there's no other locale available, return the JVM default.- Returns:
- The user's current locale setting.
- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
setLocale
Set the locale to use for this user session.- Parameters:
locale- The preferred locale for this user for the live of this session.- Throws:
ServiceException- If a service level error occurs.RemoteException- In the event of remote object failure.
-
enableLocalAdminMode
This sets up a special case where an administrative user with an internal account is used to authenticate a user. Since the internal account cannot be used to authenticate against other resources like a workspace server, this creates a problem because the UserContext won't go get other credentials in the primary authentication domain. This overrides that behavior and makes the primary credential "sticky", so it won't really be removed if requested.- Parameters:
authDomain- The domain to retrieve all credentials for. This overrides my default behavior of not getting any more credentials for the primary authentication domain.- Throws:
ServiceException- If a metadata or service-level error occurs.RemoteException- In the event of remote object failure.
-