public final class CentralAuthenticationServiceImpl extends Object implements CentralAuthenticationService
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.serviceTicketRegistry - Provides an alternative to configure separate registries for TGTs and ST in order to store them
in different locations (i.e. long term memory or short-term)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 and Description |
|---|
CentralAuthenticationServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
String |
createTicketGrantingTicket(Credentials credentials)
Create a TicketGrantingTicket based on opaque credentials supplied by the
caller.
|
String |
delegateTicketGrantingTicket(String serviceTicketId,
Credentials credentials)
Delegate a TicketGrantingTicket to a Service for proxying authentication
to other Services.
|
void |
destroyTicketGrantingTicket(String ticketGrantingTicketId)
Implementation of destoryTicketGrantingTicket expires the ticket provided
and removes it from the TicketRegistry.
|
String |
grantServiceTicket(String ticketGrantingTicketId,
Service service)
Grant a ServiceTicket for a Service.
|
String |
grantServiceTicket(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 |
setPersistentIdGenerator(PersistentIdGenerator persistentIdGenerator) |
void |
setServicesManager(ServicesManager servicesManager) |
void |
setServiceTicketExpirationPolicy(ExpirationPolicy serviceTicketExpirationPolicy)
Method to inject the TicketGrantingTicket Expiration Policy.
|
void |
setServiceTicketRegistry(TicketRegistry serviceTicketRegistry) |
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.
|
void |
setUniqueTicketIdGeneratorsForService(Map<String,UniqueTicketIdGenerator> uniqueTicketIdGeneratorsForService) |
Assertion |
validateServiceTicket(String serviceTicketId,
Service service)
Validate a ServiceTicket for a particular Service.
|
@Transactional(readOnly=false) public void destroyTicketGrantingTicket(String ticketGrantingTicketId)
destroyTicketGrantingTicket in interface CentralAuthenticationServiceticketGrantingTicketId - the id of the ticket we want to destroyIllegalArgumentException - if the TicketGrantingTicket ID is null.@Transactional(readOnly=false) public String grantServiceTicket(String ticketGrantingTicketId, Service service, Credentials credentials) throws TicketException
CentralAuthenticationServicegrantServiceTicket in interface CentralAuthenticationServiceticketGrantingTicketId - Proof of prior authentication.service - The target service of the ServiceTicket.credentials - the Credentials to present to receive the
ServiceTicketIllegalArgumentException - if TicketGrantingTicket ID, Credentials
or Service are null.TicketException - if the ticket could not be created.@Transactional(readOnly=false) public String grantServiceTicket(String ticketGrantingTicketId, Service service) throws TicketException
CentralAuthenticationServicegrantServiceTicket in interface CentralAuthenticationServiceticketGrantingTicketId - Proof of prior authentication.service - The target service of the ServiceTicket.TicketException - if the ticket could not be created.@Transactional(readOnly=false) public String delegateTicketGrantingTicket(String serviceTicketId, Credentials credentials) throws TicketException
CentralAuthenticationServicedelegateTicketGrantingTicket 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.IllegalArgumentException - if the ServiceTicketId or the
Credentials are null.TicketException - if there was an error creating the ticket@Transactional(readOnly=false) public Assertion validateServiceTicket(String serviceTicketId, Service service) throws TicketException
CentralAuthenticationServicevalidateServiceTicket in interface CentralAuthenticationServiceserviceTicketId - Proof of prior authentication.service - Service wishing to validate a prior authentication.IllegalArgumentException - if the ServiceTicketId or the Service
are null.TicketException - if there was an error validating the ticket.@Transactional(readOnly=false) public String createTicketGrantingTicket(Credentials credentials) throws TicketCreationException
CentralAuthenticationServicecreateTicketGrantingTicket in interface CentralAuthenticationServicecredentials - The credentials to create the ticket forIllegalArgumentException - if the credentials are null.TicketCreationExceptionpublic void setTicketRegistry(TicketRegistry ticketRegistry)
ticketRegistry - the TicketRegistry to set.public void setServiceTicketRegistry(TicketRegistry serviceTicketRegistry)
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 setUniqueTicketIdGeneratorsForService(Map<String,UniqueTicketIdGenerator> uniqueTicketIdGeneratorsForService)
public void setServicesManager(ServicesManager servicesManager)
public void setPersistentIdGenerator(PersistentIdGenerator persistentIdGenerator)
Copyright © 2004-2012 Jasig. All Rights Reserved.