org.jasig.cas.remoting.server
Class RemoteCentralAuthenticationService

java.lang.Object
  extended by org.jasig.cas.remoting.server.RemoteCentralAuthenticationService
All Implemented Interfaces:
CentralAuthenticationService

public final class RemoteCentralAuthenticationService
extends java.lang.Object
implements CentralAuthenticationService

Wrapper implementation around a CentralAuthenticationService that does completes the marshalling of parameters from the web-service layer to the service layer. Typically the only thing that is done is to validate the parameters (as you would in the web tier) and then delegate to the service layer.

The following properties are required:

Since:
3.0
Version:
$Revision: 47644 $ $Date: 2010-01-07 23:05:35 -0500 (Thu, 07 Jan 2010) $
Author:
Scott Battaglia

Constructor Summary
RemoteCentralAuthenticationService()
           
 
Method Summary
 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)
          Destroy a TicketGrantingTicket.
 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 setCentralAuthenticationService(CentralAuthenticationService centralAuthenticationService)
          Set the CentralAuthenticationService.
 void setValidator(javax.validation.Validator validator)
          Set the list of validators.
 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

RemoteCentralAuthenticationService

public RemoteCentralAuthenticationService()
Method Detail

createTicketGrantingTicket

public java.lang.String createTicketGrantingTicket(Credentials credentials)
                                            throws TicketException
Description copied from interface: CentralAuthenticationService
Create a TicketGrantingTicket based on opaque credentials supplied by the caller.

Specified by:
createTicketGrantingTicket in interface CentralAuthenticationService
Parameters:
credentials - The credentials to create the ticket for
Returns:
The String identifier of the ticket (may not be null).
Throws:
java.lang.IllegalArgumentException - if the Credentials are null or if given invalid credentials.
TicketException - if ticket cannot be created

grantServiceTicket

public java.lang.String grantServiceTicket(java.lang.String ticketGrantingTicketId,
                                           Service service)
                                    throws TicketException
Description copied from interface: CentralAuthenticationService
Grant a ServiceTicket for a Service.

Specified by:
grantServiceTicket in interface CentralAuthenticationService
Parameters:
ticketGrantingTicketId - Proof of prior authentication.
service - The target service of the ServiceTicket.
Returns:
the ServiceTicket for target Service.
Throws:
TicketException - if the ticket could not be created.

grantServiceTicket

public java.lang.String grantServiceTicket(java.lang.String ticketGrantingTicketId,
                                           Service service,
                                           Credentials credentials)
                                    throws TicketException
Description copied from interface: CentralAuthenticationService
Grant a ServiceTicket for a Service *if* the principal resolved from the credentials matches the principal associated with the TicketGrantingTicket.

Specified by:
grantServiceTicket in interface CentralAuthenticationService
Parameters:
ticketGrantingTicketId - Proof of prior authentication.
service - The target service of the ServiceTicket.
credentials - the Credentials to present to receive the ServiceTicket
Returns:
the ServiceTicket for target Service.
Throws:
java.lang.IllegalArgumentException - if given invalid credentials
TicketException - if the ticket could not be created.

validateServiceTicket

public Assertion validateServiceTicket(java.lang.String serviceTicketId,
                                       Service service)
                                throws TicketException
Description copied from interface: CentralAuthenticationService
Validate a ServiceTicket for a particular Service.

Specified by:
validateServiceTicket in interface CentralAuthenticationService
Parameters:
serviceTicketId - Proof of prior authentication.
service - Service wishing to validate a prior authentication.
Returns:
ServiceTicket if valid for the service
Throws:
TicketException - if there was an error validating the ticket.

destroyTicketGrantingTicket

public void destroyTicketGrantingTicket(java.lang.String ticketGrantingTicketId)
Description copied from interface: CentralAuthenticationService
Destroy a TicketGrantingTicket. This has the effect of invalidating any Ticket that was derived from the TicketGrantingTicket being destroyed.

Specified by:
destroyTicketGrantingTicket in interface CentralAuthenticationService
Parameters:
ticketGrantingTicketId - the id of the ticket we want to destroy

delegateTicketGrantingTicket

public java.lang.String delegateTicketGrantingTicket(java.lang.String serviceTicketId,
                                                     Credentials credentials)
                                              throws TicketException
Description copied from interface: CentralAuthenticationService
Delegate a TicketGrantingTicket to a Service for proxying authentication to other Services.

Specified by:
delegateTicketGrantingTicket in interface CentralAuthenticationService
Parameters:
serviceTicketId - The service ticket that will delegate to a TicketGrantingTicket
credentials - The credentials of the service that wishes to have a TicketGrantingTicket delegated to it.
Returns:
TicketGrantingTicket that can grant ServiceTickets that proxy authentication.
Throws:
java.lang.IllegalArgumentException - if the credentials are invalid.
TicketException - if there was an error creating the ticket

setCentralAuthenticationService

public void setCentralAuthenticationService(CentralAuthenticationService centralAuthenticationService)
Set the CentralAuthenticationService.

Parameters:
centralAuthenticationService - The CentralAuthenticationService to set.

setValidator

public void setValidator(javax.validation.Validator validator)
Set the list of validators.

Parameters:
validator - The array of validators to use.


Copyright © 2004-2010 Java Architectures Special Interest Group. All Rights Reserved.