|
| Foundation |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
@SASScope(value="ALL") @BinaryCompatibilityOnly public interface UserContextInterface
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.
| Field Summary | |
|---|---|
static java.lang.String |
IDPROPAGATION_SSPI
Name of SSPI ID propagation mechanism. |
static java.lang.String |
IDPROPAGATION_TRUSTED_PEER
Name of Trusted Peer ID propagation mechanism. |
static java.lang.String |
INTERNAL_AUTH_DOMAIN
The internal authentication domain that will be set on an identity if the resolved domain matches the internal authenticator domain from the server. |
static java.lang.String |
SHAREDRESOURCEKEY_ENVIRONMENT
Key for an environment object in the shared resource map. |
static java.lang.String |
SHAREDRESOURCEKEY_SERVICEID
|
| Method Summary | |
|---|---|
abstract void |
addException(java.lang.Exception exception)
Add an exception to the list. |
abstract void |
addIdentity(UserIdentityInterface identity)
Add an identity to the context. |
abstract void |
addRepository(java.lang.Object repository)
Add a repository to this user context. |
abstract void |
addRepositoryGroup(RepositoryGroup group)
Add a repository group to this UserContext. |
abstract void |
addServer(ServerInterface server)
Add a server to the list that this user is connected to. |
abstract void |
addUserIdentityListener(UserIdentityListener listener)
|
abstract boolean |
authenticate()
Authenticate a user based on their current OS identity. |
abstract boolean |
authenticate(UserIdentityInterface ident,
java.util.Map options)
Authenticates a user identity. |
abstract void |
clearExceptions()
Clear the exception list. |
abstract void |
destroy()
Destroy the user context. |
abstract void |
enableLocalAdminMode(java.lang.String authDomain)
This sets up a special case where an administrative user with an internal account is used to authenticate a user. |
abstract java.util.List |
getActions(java.lang.String appName)
Get a List of actions associated with an application that this user can perform. |
abstract java.util.List |
getActions(java.lang.String appName,
boolean onlyGrantedActions)
Get a List of actions associated with an application. |
abstract java.lang.String |
getAppSource()
Get the name of the application that initiated the login request for this UserContext. |
abstract RepositoryInterface |
getAuthRepository()
Deprecated. Use getAuthServer instead. |
abstract java.lang.String |
getAuthRepositoryName()
Deprecated. Use getAuthServerName instead. |
abstract ServerInterface |
getAuthServer()
Get a handle to the metadata server the user authenticated against. |
abstract java.lang.String |
getAuthServerName()
Get the definition name of the server the user authenticated against. |
abstract RemoteCallbackHandler |
getChallengeCallbackHandler()
Get the object that will handle credential challenge callbacks. |
abstract java.lang.String |
getClientSource()
Get the client location idetifier where the login request originated. |
abstract java.lang.String |
getDescription()
Get the common description for this user. |
abstract java.lang.Exception[] |
getExceptions()
Get an array of exceptions that have occurred since the last time they were cleared. |
abstract java.util.Map<java.lang.String,com.sas.services.security.ApplicationAuthorization> |
getGrantedApplicationActions(java.lang.String... applicationName)
Returns a map of actions granted to the user for the specified application(s). |
abstract java.util.List |
getGroups()
Get a List of the groups this user is a member of. |
abstract java.util.List |
getIdentities()
Get an iterator of UserIdentityInterface objects that represent the currently available authentication identities for the user. |
abstract java.util.List |
getIdentitiesByDomain(java.lang.String domain,
boolean issueChallenge,
java.lang.String challengePrompt)
This method returns a list of all the credential sets that are available for the requested domain. |
abstract UserIdentityInterface |
getIdentityByDomain(java.lang.String domain)
Get an authentication identity for the given domain. |
abstract UserIdentityInterface |
getIdentityByDomain(java.lang.String domain,
boolean issueChallenge)
Get an identity by domain. |
abstract UserIdentityInterface |
getIdentityByDomain(java.lang.String domain,
boolean issueChallenge,
java.lang.String challengePrompt)
Get an identity by domain. |
abstract java.lang.String |
getIDPropagation()
If the UserContext was authenticated using an ID propagation mechanism such as SSPI, the name of the ID propagation mechanism is returned. |
abstract java.lang.String |
getKey()
Get the user key. |
abstract java.util.Locale |
getLocale()
Get the locale for this user. |
abstract LoginCallbackHandler |
getLoginCallback()
Get the callback handler. |
abstract long |
getLoginTime()
Get the timestamp when the user was authenticated. |
abstract java.lang.String |
getName()
Get the name of this user. |
abstract IdentityInterface |
getPerson()
Return the IdentityInterface object that represents this user. |
abstract java.lang.String |
getPersonFQID()
Get the FQID of the authenticated Identity. |
abstract java.util.Set |
getPrincipals()
Gets the set of principals. |
abstract java.util.Set |
getPrivateCredentials()
Gets the set of private credentials. |
abstract ProfileInterface |
getProfile()
Get the user's profile set. |
abstract java.util.Set |
getPublicCredentials()
Gets the set of public credentials. |
abstract java.util.List |
getRepositories()
Get a List of the repositories this user is connected to. |
abstract RepositoryInterface |
getRepository(java.lang.String name)
Get a repository based on the name. |
abstract RepositoryGroup |
getRepositoryGroup(java.lang.String name)
Get a repository group from this UserContext. |
abstract java.lang.String |
getResolvedUserId()
Return the metadata server resolved user id. |
abstract java.util.List |
getRoles()
Get a List of the roles this user is a member of. |
abstract ServerInterface |
getServer(java.lang.String name)
Get a specific named Information Service server from this user. |
abstract java.util.List |
getServers()
Get a List of the servers this user is connected to. |
abstract SessionContextInterface |
getSessionContext()
Get the session context for this user. |
abstract java.lang.Object |
getSharedResource(java.lang.String key)
Get an object from the shared resource map. |
abstract java.lang.String |
getUniqueId()
Returns a unique identifier for this object. |
abstract boolean |
hasCapability(java.lang.String appName,
java.lang.String action)
Check whether this user has the capability to perform a specific action for a particular application. |
abstract boolean |
isDestroyed()
Return true if this User Context has been destroyed, or is in the process of being destroyed. |
abstract boolean |
isInAnyGroup(java.util.List groupList)
Check whether the user is a member of any of the groups in the list. |
abstract boolean |
isInAnyRole(java.util.List roleList)
Check whether the user is a member of any of the roles in the list. |
abstract boolean |
isInGroup(java.lang.String group)
Check whether the user is a member of a given group. |
abstract boolean |
isInRole(java.lang.String role)
Check whether the user is a member of a given role. |
abstract boolean |
isInternalUser()
Return a boolean indicating if this user was created using an internal userid. |
abstract java.lang.Object |
putSharedResource(java.lang.String key,
java.lang.Object value)
Put an object into the shared resource map. |
abstract void |
refreshRepositoryData()
Refresh all of the data that's been retrieved using the Information Service during the life of this UserContext. |
abstract void |
removeIdentity(UserIdentityInterface identity)
Remove an identity from the context. |
abstract void |
removeRepository(java.lang.Object repository)
Remove a repository from this context. |
abstract void |
removeRepositoryGroup(RepositoryGroup group)
Remove a repository group from this UserContext. |
abstract void |
removeServer(ServerInterface server)
Remove a server from the list that this user is currently connected to. |
abstract void |
setAppSource(java.lang.String source)
Set the application source identifier that initiated the logon request for this UserContext. |
abstract void |
setChallengeCallbackHandler(RemoteCallbackHandler handler)
Set the object that will be used to handle credential challenge callbacks. |
abstract void |
setClientSource(java.lang.String source)
Set the source location identifier for this UserContext. |
abstract void |
setKey(java.lang.String key)
Set the user key. |
abstract void |
setLocale(java.util.Locale locale)
Set the locale to use for this user session. |
abstract void |
setName(java.lang.String name)
Set the name of the user. |
abstract void |
setPerson(IdentityInterface identity)
This method gets called by UserService as part of the UserContext initialization. |
abstract void |
setSessionContext(SessionContextInterface session)
Set the session context that this user context will use for logging, etc. |
abstract byte[] |
toByteArray()
|
| Field Detail |
|---|
static final java.lang.String SHAREDRESOURCEKEY_ENVIRONMENT
getSharedResource(String),
putSharedResource(String, Object),
Constant Field Valuesstatic final java.lang.String SHAREDRESOURCEKEY_SERVICEID
static final java.lang.String IDPROPAGATION_SSPI
getIDPropagation(),
Constant Field Valuesstatic final java.lang.String IDPROPAGATION_TRUSTED_PEER
getIDPropagation(),
Constant Field Valuesstatic final java.lang.String INTERNAL_AUTH_DOMAIN
| Method Detail |
|---|
void setSessionContext(SessionContextInterface session)
throws java.rmi.RemoteException
session - The session context.
java.rmi.RemoteException - in the event of network failure.
SessionContextInterface getSessionContext()
throws java.rmi.RemoteException
java.rmi.RemoteException - in the event of network failure.
java.lang.String getPersonFQID()
throws java.rmi.RemoteException
java.rmi.RemoteException - In the event of remote object failure.
java.lang.String getName()
throws java.rmi.RemoteException
java.rmi.RemoteException - in the event of network problems.
void setName(java.lang.String name)
throws java.rmi.RemoteException
name - The user name.
java.rmi.RemoteException - in the event of network problems.
java.lang.String getDescription()
throws java.rmi.RemoteException
java.rmi.RemoteException - in the event of remote object failure.
java.lang.String getKey()
throws java.rmi.RemoteException
java.rmi.RemoteException - in the event of network problems.
void setKey(java.lang.String key)
throws java.rmi.RemoteException
key - The key that identifies this user.
java.rmi.RemoteException - in the event of network problems.
java.lang.String getClientSource()
throws java.rmi.RemoteException
java.rmi.RemoteException - In the event of remote object failure.
void setClientSource(java.lang.String source)
throws java.rmi.RemoteException
source - The source location identifier (usually a
TCP/IP address).
java.rmi.RemoteException - In the event of remote object failure.
java.lang.String getAppSource()
throws java.rmi.RemoteException
java.rmi.RemoteException - In the event of remote object failure.
void setAppSource(java.lang.String source)
throws java.rmi.RemoteException
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.
java.rmi.RemoteException - In the event of remote object failure.
java.lang.String getIDPropagation()
throws ServiceException,
java.rmi.RemoteException
null is returned
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.IDPROPAGATION_SSPI,
IDPROPAGATION_TRUSTED_PEER
void addIdentity(UserIdentityInterface identity)
throws java.rmi.RemoteException
identity - The new identity for this user.
java.rmi.RemoteException - in the event of network problems.
void removeIdentity(UserIdentityInterface identity)
throws java.rmi.RemoteException
identity - The identity to remove.
java.rmi.RemoteException - In the event of network object failure.
java.util.List getIdentities()
throws java.rmi.RemoteException
java.rmi.RemoteException - in the event of network problems.
UserIdentityInterface getIdentityByDomain(java.lang.String domain)
throws java.rmi.RemoteException
domain - The domain for which to retrieve an identity.
java.rmi.RemoteException - in the event of network problems.
UserIdentityInterface getIdentityByDomain(java.lang.String domain,
boolean issueChallenge)
throws java.rmi.RemoteException,
ServiceException
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.
java.rmi.RemoteException - in the event of network problems.
ServiceException - if unable to obtain the identity by domain.
UserIdentityInterface getIdentityByDomain(java.lang.String domain,
boolean issueChallenge,
java.lang.String challengePrompt)
throws java.rmi.RemoteException,
ServiceException
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.
java.rmi.RemoteException - in the event of network problems.
ServiceException - if unable to obtain the identity by domain.
java.util.List getIdentitiesByDomain(java.lang.String domain,
boolean issueChallenge,
java.lang.String challengePrompt)
throws java.rmi.RemoteException,
ServiceException
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.
java.rmi.RemoteException - if the event of remote object failure.
ServiceException - if a service error occurs.
void addRepositoryGroup(RepositoryGroup group)
throws ServiceException,
java.rmi.RemoteException
InformationServiceInterface.searchGroupName(UserContextInterface, String, com.sas.services.information.FilterInterface),
or InformationServiceInterface.searchGroupNameWithFilterArray(UserContextInterface, String, com.sas.services.information.FilterInterface[]).
group - The repository group to add.
ServiceException - If the group name is null, or if a group with the same name
already exists in the UserContext.
java.rmi.RemoteException - In the event of remote object failure.
void removeRepositoryGroup(RepositoryGroup group)
throws ServiceException,
java.rmi.RemoteException
group - The Group to remove.
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.
RepositoryGroup getRepositoryGroup(java.lang.String name)
throws ServiceException,
java.rmi.RemoteException
InformationServiceInterface.searchGroup(UserContextInterface, com.sas.services.information.RepositoryGroup, com.sas.services.information.FilterInterface),
or InformationServiceInterface.searchGroupWithFilterArray(UserContextInterface, com.sas.services.information.RepositoryGroup, com.sas.services.information.FilterInterface[]).
name - The name of the group to return.
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.
ProfileInterface getProfile()
throws java.rmi.RemoteException
java.rmi.RemoteException - In the event of a remote failure.
void addRepository(java.lang.Object repository)
throws java.rmi.RemoteException
repository - A connected repository that uses an identity for this user
java.rmi.RemoteException - In the event of a remote failure.
void removeRepository(java.lang.Object repository)
throws java.rmi.RemoteException
repository - The repository to remove from this context.
java.rmi.RemoteException - In the event of a remote failure.
RepositoryInterface getRepository(java.lang.String name)
throws ServiceException,
java.rmi.RemoteException
name - The name of the repository to return the handle to.
ServiceException - in the event of a service failure.
java.rmi.RemoteException - in the event of a network failure.
RepositoryInterface getAuthRepository()
throws ServiceException,
java.rmi.RemoteException
ServiceException - in the event of a service failure.
java.rmi.RemoteException - in the event of a network failure.
java.lang.String getAuthRepositoryName()
throws ServiceException,
java.rmi.RemoteException
ServiceException - in the event of a service failure.
java.rmi.RemoteException - in the event of a network failure.
ServerInterface getAuthServer()
throws ServiceException,
java.rmi.RemoteException
ServiceException - If a server error occurs.
java.rmi.RemoteException - In the event of remote object failure.
java.lang.String getAuthServerName()
throws ServiceException,
java.rmi.RemoteException
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.
java.util.List getRepositories()
throws java.rmi.RemoteException
java.rmi.RemoteException - In the event of a remote failure.
java.util.List getServers()
throws java.rmi.RemoteException
ServerInterface
objects this user has connections to.
java.rmi.RemoteException - In the event of remote object failure.
void addServer(ServerInterface server)
throws ServiceException,
java.rmi.RemoteException
server - A server to which this user has an active connection.
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.
void removeServer(ServerInterface server)
throws ServiceException,
java.rmi.RemoteException
server - The server to remove from the active list.
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.
ServerInterface getServer(java.lang.String name)
throws ServiceException,
java.rmi.RemoteException
name - The configured name of the server to get from the connected list.
ServerInterface with the requested name,
or null if it's not connected.
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.
java.util.Set getPrincipals()
throws java.rmi.RemoteException
java.rmi.RemoteException - In the event of a remote failure.
java.util.Set getPublicCredentials()
throws java.rmi.RemoteException
java.rmi.RemoteException - In the event of a remote failure.
java.util.Set getPrivateCredentials()
throws java.rmi.RemoteException
java.rmi.RemoteException - In the event of a remote failure.
LoginCallbackHandler getLoginCallback()
throws java.rmi.RemoteException
java.rmi.RemoteException - In the event of a remote failure.
boolean authenticate()
throws java.rmi.RemoteException
java.rmi.RemoteException - In the event of remote object failure.
boolean authenticate(UserIdentityInterface ident,
java.util.Map options)
throws java.rmi.RemoteException
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).
java.rmi.RemoteException - In the event of a remote failure.
void destroy()
throws java.rmi.RemoteException
java.rmi.RemoteException - In the event of a remote failure.
void addException(java.lang.Exception exception)
throws java.rmi.RemoteException
exception - Exception to be added to the list.
java.rmi.RemoteException - In the event of a remote failure.
void clearExceptions()
throws java.rmi.RemoteException
java.rmi.RemoteException - In the event of a remote failure.
java.lang.Exception[] getExceptions()
throws java.rmi.RemoteException
java.rmi.RemoteException - In the event of a remote failure.
void setChallengeCallbackHandler(RemoteCallbackHandler handler)
throws java.rmi.RemoteException
handler - The credential callback handler. This object will have to be
an implementation of the javax.security.auth.callback.CallbackHandler
interface.
java.rmi.RemoteException - In the event of a remote failure.
RemoteCallbackHandler getChallengeCallbackHandler()
throws java.rmi.RemoteException
java.rmi.RemoteException - In the event of a remote failure.
IdentityInterface getPerson()
throws java.rmi.RemoteException
java.rmi.RemoteException - in the event of remote object failure.
void setPerson(IdentityInterface identity)
throws java.rmi.RemoteException,
java.lang.IllegalStateException
identity - The Person object that represents the user.
java.rmi.RemoteException - In the event of remote object failure.
java.lang.IllegalStateException - If the identity object has already been set.
java.lang.String getUniqueId()
throws java.rmi.RemoteException
java.rmi.RemoteException - in the event of remote object failure.
boolean isDestroyed()
throws java.rmi.RemoteException
java.rmi.RemoteException - in the event of remote object failure.
long getLoginTime()
throws java.rmi.RemoteException
java.rmi.RemoteException - In the event of remote object failure.
java.lang.Object getSharedResource(java.lang.String key)
throws java.rmi.RemoteException
key - The key to the object in the resource map.
java.rmi.RemoteException - In the event of remote object failure.
java.lang.Object putSharedResource(java.lang.String key,
java.lang.Object value)
throws java.rmi.RemoteException
key - The lookup key for the resource.value - The resource object to store.
java.rmi.RemoteException - In the event of remote object failure.
byte[] toByteArray()
throws java.rmi.RemoteException
java.rmi.RemoteException
void addUserIdentityListener(UserIdentityListener listener)
throws java.rmi.RemoteException
java.rmi.RemoteException
boolean isInRole(java.lang.String role)
throws ServiceException,
java.rmi.RemoteException
role - The role name to check for.
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.
boolean isInAnyRole(java.util.List roleList)
throws ServiceException,
java.rmi.RemoteException
roleList - A List of Strings representing role names.
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.
java.util.List getRoles()
throws ServiceException,
java.rmi.RemoteException
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.
boolean hasCapability(java.lang.String appName,
java.lang.String action)
throws ServiceException,
java.rmi.RemoteException
appName - The SoftwareComponent name associated with the application.action - The action to perform.
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.
java.util.List getActions(java.lang.String appName)
throws ServiceException,
java.rmi.RemoteException
Note: getGrantedApplicationActions(String...) is recommended instead
of this method.
appName - The SoftwareComponent name associated with the application.
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.com.sas.services.security.ApplicationAuthorization()
java.util.List getActions(java.lang.String appName,
boolean onlyGrantedActions)
throws ServiceException,
java.rmi.RemoteException
Note: Use getGrantedApplicationActions(String...) (for granted
actions) or com.sas.services.information.metadata.ApplicationInterface#getActions(com.sas.services.information.metadata.ApplicationInterface...)
(for all actions) instead of this method.
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.
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.com.sas.services.security.ApplicationAuthorization()
java.util.Map<java.lang.String,com.sas.services.security.ApplicationAuthorization> getGrantedApplicationActions(java.lang.String... applicationName)
throws ServiceException,
java.rmi.RemoteException
applicationName - one or more application names
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.com.sas.services.security.ApplicationAuthorization()
boolean isInGroup(java.lang.String group)
throws ServiceException,
java.rmi.RemoteException
group - The group name to check for.
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.
boolean isInAnyGroup(java.util.List groupList)
throws ServiceException,
java.rmi.RemoteException
groupList - A List of Strings representing group names.
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.
java.util.List getGroups()
throws ServiceException,
java.rmi.RemoteException
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.
void refreshRepositoryData()
throws ServiceException,
java.rmi.RemoteException
ServiceException - If an exception occurs during the
refresh operation.
java.rmi.RemoteException - In the event of remote object failure.
java.lang.String getResolvedUserId()
throws ServiceException,
java.rmi.RemoteException
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.
boolean isInternalUser()
throws ServiceException,
java.rmi.RemoteException
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.
java.util.Locale getLocale()
throws ServiceException,
java.rmi.RemoteException
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.
void setLocale(java.util.Locale locale)
throws ServiceException,
java.rmi.RemoteException
locale - The preferred locale for this user for the live of this session.
ServiceException - If a service level error occurs.
java.rmi.RemoteException - In the event of remote object failure.
void enableLocalAdminMode(java.lang.String authDomain)
throws ServiceException,
java.rmi.RemoteException
authDomain - The domain to retrieve all credentials for. This overrides
my default behavior of not getting any more credentials for the primary authentication
domain.
ServiceException - If a metadata or service-level error occurs.
java.rmi.RemoteException - In the event of remote object failure.
|
| Foundation |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||