|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MoriaStore
The store manager's main functionality is to handle tickets. The interface makes it possible to create tickets and store them and their associated data. The interface also has support for removal of expired tickets.
Method Summary | |
---|---|
java.lang.String |
cacheUserData(java.util.HashMap attributes,
java.lang.String userorg)
Creates a new CachedUserData object in the underlying store and associates it with an SSO ticket which is returned. |
java.lang.String |
createAuthnAttempt(java.lang.String[] requestAttributes,
java.lang.String responseURLPrefix,
java.lang.String responseURLPostfix,
boolean forceInteractiveAuthentication,
java.lang.String servicePrincipal)
Creates an authentication attempt based on a service request. |
java.lang.String |
createProxyTicket(java.lang.String tgTicketId,
java.lang.String servicePrincipal,
java.lang.String targetServicePrincipal)
Creates a new proxy ticket from a TGT and associates the new ticket with the same user data as the TGT. |
java.lang.String |
createServiceTicket(java.lang.String loginTicketId)
Creates a service ticket that the service will use when requesting user attributes after a successful authentication. |
java.lang.String |
createTicketGrantingTicket(java.lang.String ssoTicketId,
java.lang.String targetServicePrincipal)
Creates a new ticket granting ticket, using an sso ticket. |
MoriaAuthnAttempt |
getAuthnAttempt(java.lang.String ticketId,
boolean keep,
java.lang.String servicePrincipal)
Gets the authentication attempt associated with the ticket given as argument. |
java.lang.String |
getTicketServicePrincipal(java.lang.String ticketId,
MoriaTicketType ticketType)
Returns the service principal for the ticket. |
java.lang.String |
getTicketUserorg(java.lang.String ticketId,
MoriaTicketType ticketType)
Gets the userorg of a ticket. |
CachedUserData |
getUserData(java.lang.String proxyTicketId,
java.lang.String servicePrincipal)
Returns the userdata associated with the incoming ticket, which must be either a proxy ticket, an SSO ticket or ticket granting ticket. |
void |
removeSSOTicket(java.lang.String ssoTicketId)
Removes an SSO ticket from the store. |
void |
setConfig(java.util.Properties properties)
Sets the configuration of the store. |
void |
setTicketUserorg(java.lang.String ticketId,
MoriaTicketType ticketType,
java.lang.String userorg)
Sets the userorg of a ticket. |
void |
setTransientAttributes(java.lang.String loginTicketId,
java.util.HashMap transientAttributes)
Sets transient attributes stored with authentication attempt. |
void |
setTransientSSOAttributes(java.lang.String loginTicketId,
java.lang.String ssoTicketId,
java.lang.String[] ssoEnabledAttributeNames)
Sets transient attributes stored with authentication attempt, copied from a cached user data object. |
void |
stop()
Stops this instance of the store. |
Method Detail |
---|
void setConfig(java.util.Properties properties) throws MoriaStoreConfigurationException
properties
- Object containing the necessary attributes for store configuration.
MoriaStoreConfigurationException
- If the store cannot be started with the given configuration.
java.lang.IllegalArgumentException
- If properties is null.void stop()
java.lang.String createAuthnAttempt(java.lang.String[] requestAttributes, java.lang.String responseURLPrefix, java.lang.String responseURLPostfix, boolean forceInteractiveAuthentication, java.lang.String servicePrincipal) throws MoriaStoreException
requestAttributes
- The user attributes the requesting service asks for.responseURLPrefix
- The forward part of the url the client is to be redirected to.responseURLPostfix
- The end part of the url the client is to be redirected to.forceInteractiveAuthentication
- If the user should be forced to login interactively. I.e. disable
support for single sign-on.servicePrincipal
- The id of the service doing the request.
MoriaStoreException
- If the operation fails.
java.lang.IllegalArgumentException
- If any of the arguments are null, and if responseURLPrefix or servicePrincipal are zero length.MoriaAuthnAttempt getAuthnAttempt(java.lang.String ticketId, boolean keep, java.lang.String servicePrincipal) throws InvalidTicketException, NonExistentTicketException, MoriaStoreException
ticketId
- the ticket from the incoming client request (must be LOGIN or SERVICE)keep
- if true the authnAttempt and ticket will be kept in the store after this operationservicePrincipal
- the principal of the service requesting the operation (null if login ticket is supplied)
InvalidTicketException
- if the incoming ticket is found to be invalid
NonExistentTicketException
- If ticket does not exist
MoriaStoreException
- If the operation fails
java.lang.IllegalArgumentException
- If ticketId is null or zero length and if no servicePrincipal is
supplied with a service ticketjava.lang.String cacheUserData(java.util.HashMap attributes, java.lang.String userorg) throws MoriaStoreException
attributes
- The attribute map to be cached.userorg
- The userorg that is to be associated with the ticket.
MoriaStoreException
- If the operation fails.
java.lang.IllegalArgumentException
- If attributes is null, or
userorg is null or an empty string.CachedUserData getUserData(java.lang.String proxyTicketId, java.lang.String servicePrincipal) throws InvalidTicketException, NonExistentTicketException, MoriaStoreException
proxyTicketId
- A ticket to identify a userdata object (SSO, TGT or PROXY).servicePrincipal
- The name of the service requesting the data,
InvalidTicketException
- If the incoming ticket is not of the correct type or
has an invalid principal.
NonExistentTicketException
- If ticket does not exist.
MoriaStoreException
- If the operation fails.
java.lang.IllegalArgumentException
- If ticketId is null or zero length, or SSO ticket principal
is null or zero length.java.lang.String createServiceTicket(java.lang.String loginTicketId) throws InvalidTicketException, NonExistentTicketException, MoriaStoreException
loginTicketId
- A login ticket associated with an authentication attempt.
InvalidTicketException
- If the supplied ticket is not a login ticket.
NonExistentTicketException
- If ticket does not exist.
MoriaStoreException
- If the operation fails.
java.lang.IllegalArgumentException
- If loginTicketId is null or zero length.java.lang.String createTicketGrantingTicket(java.lang.String ssoTicketId, java.lang.String targetServicePrincipal) throws InvalidTicketException, NonExistentTicketException, MoriaStoreException
ssoTicketId
- An sso ticket that is already associated with a cached userdata object.targetServicePrincipal
- The id of the service that will use the TGT.
InvalidTicketException
- If the argument ticket is not an SSO ticket or has an invalid principal.
NonExistentTicketException
- If ticket does not exist.
MoriaStoreException
- If the operation fails.
java.lang.IllegalArgumentException
- If any of the arguments are null or zero length.java.lang.String createProxyTicket(java.lang.String tgTicketId, java.lang.String servicePrincipal, java.lang.String targetServicePrincipal) throws InvalidTicketException, NonExistentTicketException, MoriaStoreException
tgTicketId
- A TGT issued earlier to a service.servicePrincipal
- The id of the service making the request.targetServicePrincipal
- The id of the service that will use the proxy ticket.
InvalidTicketException
- If the incoming ticket is not a TGT or has an invalid principal.
NonExistentTicketException
- If ticket does not exist.
MoriaStoreException
- If the operation fails.
java.lang.IllegalArgumentException
- If any of the arguments are null or zero length.void setTransientAttributes(java.lang.String loginTicketId, java.util.HashMap transientAttributes) throws InvalidTicketException, NonExistentTicketException, MoriaStoreException
loginTicketId
- Ticket that identifies the AuthnAttempt that the attributes will be
associated with.transientAttributes
- Attributes to store with the AuthnAttempt.
InvalidTicketException
- If ticket is found invalid.
NonExistentTicketException
- If ticket does not exist.
MoriaStoreException
- If the operation fails.
java.lang.IllegalArgumentException
- If loginTicketId is null or zero length, or transientAttributes is null.void setTransientSSOAttributes(java.lang.String loginTicketId, java.lang.String ssoTicketId, java.lang.String[] ssoEnabledAttributeNames) throws InvalidTicketException, NonExistentTicketException, MoriaStoreException
loginTicketId
- Ticket that identifies the AuthnAttempt that the attributes will be
associated with.ssoTicketId
- Ticket associated with a set of cached user data.ssoEnabledAttributeNames
- The names of those attributes which should be stored with the
authentication attempt; should include only those attributes
the service is allowed to use in an SSO context.
InvalidTicketException
- If either ticket is found invalid.
NonExistentTicketException
- If either ticket does not exist.
MoriaStoreException
- If the operation fails.
java.lang.IllegalArgumentException
- If either ticket id is null or zero length.void removeSSOTicket(java.lang.String ssoTicketId) throws NonExistentTicketException, MoriaStoreException
ssoTicketId
- the ticketId of the ticket to remove
NonExistentTicketException
- If ticket does not exist
MoriaStoreException
- If the operation fails
java.lang.IllegalArgumentException
- If ssoTicketId is null or zero lengthjava.lang.String getTicketServicePrincipal(java.lang.String ticketId, MoriaTicketType ticketType) throws InvalidTicketException, NonExistentTicketException, MoriaStoreException
ticketId
- The ticket id.ticketType
- The ticket type.
InvalidTicketException
- If the ticket is invalid.
NonExistentTicketException
- If ticket does not exist.
MoriaStoreException
- If the operation fails.
java.lang.IllegalArgumentException
- If ticketId is null or zero length.void setTicketUserorg(java.lang.String ticketId, MoriaTicketType ticketType, java.lang.String userorg) throws InvalidTicketException, NonExistentTicketException, MoriaStoreException
ticketId
- The ticket id.ticketType
- The ticket type.userorg
- The userorg of the user creating the ticket.
InvalidTicketException
- if the ticket is invalid.
NonExistentTicketException
- If ticket does not exist.
MoriaStoreException
- If the operation fails.
java.lang.IllegalArgumentException
- If ticketId is null or zero length.java.lang.String getTicketUserorg(java.lang.String ticketId, MoriaTicketType ticketType) throws InvalidTicketException, NonExistentTicketException, MoriaStoreException
ticketId
- the ticket id.ticketType
- the ticket type.
InvalidTicketException
- If the ticket is invalid.
NonExistentTicketException
- If ticket does not exist.
MoriaStoreException
- If the operation fails.
java.lang.IllegalArgumentException
- If ticketId is null or zero length.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |