|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jasig.cas.CentralAuthenticationServiceImpl
Concrete implementation of a CentralAuthenticationService, and also the central, organizing component of CAS's internal implementation.
This class is threadsafe.
This class has the following properties that must be set:
ticketRegistry - The Ticket Registry to maintain the list
of available tickets.authenticationManager - The service that will handle
authentication.ticketGrantingTicketUniqueTicketIdGenerator - Plug in to
generate unique secure ids for TicketGrantingTickets.serviceTicketUniqueTicketIdGenerator - Plug in to
generate unique secure ids for ServiceTickets.ticketGrantingTicketExpirationPolicy - The expiration
policy for TicketGrantingTickets.serviceTicketExpirationPolicy - The expiration policy for
ServiceTickets.
| Constructor Summary | |
CentralAuthenticationServiceImpl()
|
|
| Method Summary | |
void |
afterPropertiesSet()
|
java.lang.String |
createTicketGrantingTicket(Credentials credentials)
Create a TicketGrantingTicket based on opaque credentials supplied by the caller. |
java.lang.String |
delegateTicketGrantingTicket(java.lang.String serviceTicketId,
Credentials credentials)
Delegate a TicketGrantingTicket to a Service for proxying authentication to other Services. |
void |
destroyTicketGrantingTicket(java.lang.String ticketGrantingTicketId)
Implementation of destoryTicketGrantingTicket expires the ticket provided and removes it from the TicketRegistry. |
java.lang.String |
grantServiceTicket(java.lang.String ticketGrantingTicketId,
Service service)
Grant a ServiceTicket for a Service. |
java.lang.String |
grantServiceTicket(java.lang.String ticketGrantingTicketId,
Service service,
Credentials credentials)
Grant a ServiceTicket for a Service *if* the principal resolved from the credentials matches the principal associated with the TicketGrantingTicket. |
void |
setAuthenticationManager(AuthenticationManager authenticationManager)
Method to inject the AuthenticationManager into the class. |
void |
setServiceTicketExpirationPolicy(ExpirationPolicy serviceTicketExpirationPolicy)
Method to inject the TicketGrantingTicket Expiration Policy. |
void |
setServiceTicketUniqueTicketIdGenerator(UniqueTicketIdGenerator serviceTicketUniqueTicketIdGenerator)
|
void |
setTicketGrantingTicketExpirationPolicy(ExpirationPolicy ticketGrantingTicketExpirationPolicy)
Method to inject the TicketGrantingTicket Expiration Policy. |
void |
setTicketGrantingTicketUniqueTicketIdGenerator(UniqueTicketIdGenerator uniqueTicketIdGenerator)
Method to inject the Unique Ticket Id Generator into the class. |
void |
setTicketRegistry(TicketRegistry ticketRegistry)
Method to set the TicketRegistry. |
Assertion |
validateServiceTicket(java.lang.String serviceTicketId,
Service service)
Validate a ServiceTicket for a particular Service. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CentralAuthenticationServiceImpl()
| Method Detail |
public void destroyTicketGrantingTicket(java.lang.String ticketGrantingTicketId)
destroyTicketGrantingTicket in interface CentralAuthenticationServiceticketGrantingTicketId - the id of the ticket we want to destroy
java.lang.IllegalArgumentException - if the TicketGrantingTicket ID is null.
public java.lang.String grantServiceTicket(java.lang.String ticketGrantingTicketId,
Service service,
Credentials credentials)
throws TicketException
CentralAuthenticationService
grantServiceTicket in interface CentralAuthenticationServiceticketGrantingTicketId - Proof of prior authentication.service - The target service of the ServiceTicket.credentials - the Credentials to present to receive the
ServiceTicket
java.lang.IllegalArgumentException - if TicketGrantingTicket ID, Credentials
or Service are null.
TicketException - if the ticket could not be created.
public java.lang.String grantServiceTicket(java.lang.String ticketGrantingTicketId,
Service service)
throws TicketException
CentralAuthenticationService
grantServiceTicket in interface CentralAuthenticationServiceticketGrantingTicketId - Proof of prior authentication.service - The target service of the ServiceTicket.
TicketException - if the ticket could not be created.
public java.lang.String delegateTicketGrantingTicket(java.lang.String serviceTicketId,
Credentials credentials)
throws TicketException
CentralAuthenticationService
delegateTicketGrantingTicket in interface CentralAuthenticationServiceserviceTicketId - The service ticket that will delegate to a
TicketGrantingTicketcredentials - The credentials of the service that wishes to have a
TicketGrantingTicket delegated to it.
java.lang.IllegalArgumentException - if the ServiceTicketId or the
Credentials are null.
TicketException - if there was an error creating the ticket
public Assertion validateServiceTicket(java.lang.String serviceTicketId,
Service service)
throws TicketException
CentralAuthenticationService
validateServiceTicket in interface CentralAuthenticationServiceserviceTicketId - Proof of prior authentication.service - Service wishing to validate a prior authentication.
java.lang.IllegalArgumentException - if the ServiceTicketId or the Service
are null.
TicketException - if there was an error validating the ticket.
public java.lang.String createTicketGrantingTicket(Credentials credentials)
throws TicketCreationException
CentralAuthenticationService
createTicketGrantingTicket in interface CentralAuthenticationServicecredentials - The credentials to create the ticket for
java.lang.IllegalArgumentException - if the credentials are null.
TicketCreationExceptionpublic void setTicketRegistry(TicketRegistry ticketRegistry)
ticketRegistry - the TicketRegistry to set.public void setAuthenticationManager(AuthenticationManager authenticationManager)
authenticationManager - The authenticationManager to set.public void setTicketGrantingTicketExpirationPolicy(ExpirationPolicy ticketGrantingTicketExpirationPolicy)
ticketGrantingTicketExpirationPolicy - The
ticketGrantingTicketExpirationPolicy to set.public void setTicketGrantingTicketUniqueTicketIdGenerator(UniqueTicketIdGenerator uniqueTicketIdGenerator)
uniqueTicketIdGenerator - The uniqueTicketIdGenerator to usepublic void setServiceTicketExpirationPolicy(ExpirationPolicy serviceTicketExpirationPolicy)
serviceTicketExpirationPolicy - The serviceTicketExpirationPolicy to
set.
public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic void setServiceTicketUniqueTicketIdGenerator(UniqueTicketIdGenerator serviceTicketUniqueTicketIdGenerator)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||