public interface CentralAuthenticationService
This is the interface between a Web HTML, Web Services, RMI, or any other request processing layer and the CAS Service viewed as a mechanism to generate, store, validate, and retrieve Tickets containing Authentication information. The features of the request processing layer (the HttpXXX Servlet objects) are not visible here or in any modules behind this layer. In theory, a standalone application could call these methods directly as a private authentication service.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAMESPACE
CAS namespace.
|
Modifier and Type | Method and Description |
---|---|
ProxyGrantingTicket |
createProxyGrantingTicket(java.lang.String serviceTicketId,
AuthenticationResult authenticationResult)
Delegate a TicketGrantingTicket to a Service for proxying authentication
to other Services.
|
TicketGrantingTicket |
createTicketGrantingTicket(AuthenticationResult authenticationResult)
Create a
TicketGrantingTicket by authenticating credentials. |
default void |
deleteTicket(java.lang.String ticketId)
Attempts to delete a ticket from the underlying store
and is allowed to run any number of processing on the ticket
and removal op before invoking it.
|
java.util.List<LogoutRequest> |
destroyTicketGrantingTicket(java.lang.String ticketGrantingTicketId)
Destroy a TicketGrantingTicket and perform back channel logout.
|
Ticket |
getTicket(java.lang.String ticketId)
Obtains the given ticket by its id
and returns the CAS-representative object.
|
<T extends Ticket> |
getTicket(java.lang.String ticketId,
java.lang.Class<T> clazz)
Obtains the given ticket by its id and type
and returns the CAS-representative object.
|
java.util.Collection<Ticket> |
getTickets(java.util.function.Predicate<Ticket> predicate)
Retrieve a collection of tickets from the underlying ticket registry.
|
ProxyTicket |
grantProxyTicket(java.lang.String proxyGrantingTicket,
Service service)
Grant a
ProxyTicket that may be used to access the given service
by authenticating the given credentials. |
ServiceTicket |
grantServiceTicket(java.lang.String ticketGrantingTicketId,
Service service,
AuthenticationResult authenticationResult)
Grant a
ServiceTicket that may be used to access the given service
by authenticating the given credentials. |
Ticket |
updateTicket(Ticket ticket)
Updates the ticket instance in the underlying storage mechanism.
|
Assertion |
validateServiceTicket(java.lang.String serviceTicketId,
Service service)
Validate a ServiceTicket for a particular Service.
|
TicketGrantingTicket createTicketGrantingTicket(AuthenticationResult authenticationResult) throws AuthenticationException, AbstractTicketException
TicketGrantingTicket
by authenticating credentials.
The details of the security policy around credential authentication and the definition
of authentication success are dependent on the implementation, but it SHOULD be safe to assume
that at least one credential MUST be authenticated for ticket creation to succeed.authenticationResult
- the current authentication result in order to create the ticket.AuthenticationException
- on errors authenticating the credentialsAbstractTicketException
- if ticket cannot be createdTicket updateTicket(Ticket ticket)
ticket
- the ticketTicket getTicket(java.lang.String ticketId) throws InvalidTicketException
ticketId
- the ticket granting ticket idInvalidTicketException
- the invalid ticket exception<T extends Ticket> T getTicket(java.lang.String ticketId, java.lang.Class<T> clazz) throws InvalidTicketException
T
- the generic ticket type to return that extends Ticket
ticketId
- the ticket granting ticket idclazz
- the ticket type that is requested to be foundInvalidTicketException
- the invalid ticket exceptiondefault void deleteTicket(java.lang.String ticketId)
destroyTicketGrantingTicket(String)
.ticketId
- the ticket idjava.util.Collection<Ticket> getTickets(java.util.function.Predicate<Ticket> predicate)
predicate
- the predicateServiceTicket grantServiceTicket(java.lang.String ticketGrantingTicketId, Service service, AuthenticationResult authenticationResult) throws AuthenticationException, AbstractTicketException
ServiceTicket
that may be used to access the given service
by authenticating the given credentials.
The details of the security policy around credential authentication and the definition
of authentication success are dependent on the implementation, but it SHOULD be safe to assume
that at least one credential MUST be authenticated for ticket creation to succeed.
The principal that is resolved from the authenticated credentials MUST be the same as that to which the given ticket-granting ticket was issued.
ticketGrantingTicketId
- Proof of prior authentication.service
- The target service of the ServiceTicket.authenticationResult
- The authentication context established if credentials providedAuthenticationException
- on errors authenticating the credentialsAbstractTicketException
- if the ticket could not be created.ProxyTicket grantProxyTicket(java.lang.String proxyGrantingTicket, Service service) throws AbstractTicketException
ProxyTicket
that may be used to access the given service
by authenticating the given credentials.
The details of the security policy around credential authentication and the definition
of authentication success are dependent on the implementation, but it SHOULD be safe to assume
that at least one credential MUST be authenticated for ticket creation to succeed.
The principal that is resolved from the authenticated credentials MUST be the same as that to which the given ticket-granting ticket was issued.
proxyGrantingTicket
- Proof of prior authentication.service
- The target service of the ServiceTicket.AbstractTicketException
- if the ticket could not be created.Assertion validateServiceTicket(java.lang.String serviceTicketId, Service service) throws AbstractTicketException
serviceTicketId
- Proof of prior authentication.service
- Service wishing to validate a prior authentication.AbstractTicketException
- if there was an error validating the ticket.java.util.List<LogoutRequest> destroyTicketGrantingTicket(java.lang.String ticketGrantingTicketId)
IllegalArgumentException
if the TicketGrantingTicket ID is null.ticketGrantingTicketId
- the id of the ticket we want to destroyProxyGrantingTicket createProxyGrantingTicket(java.lang.String serviceTicketId, AuthenticationResult authenticationResult) throws AuthenticationException, AbstractTicketException
serviceTicketId
- The service ticket identifier that will delegate to a TicketGrantingTicket
.authenticationResult
- The current authentication context before this ticket can be granted.ServiceTicket
that proxy authentication.AuthenticationException
- on errors authenticating the credentialsAbstractTicketException
- if there was an error creating the ticket