org.jasig.cas.client.tomcat
Class AuthenticatorDelegate

java.lang.Object
  extended by org.jasig.cas.client.tomcat.AuthenticatorDelegate

public final class AuthenticatorDelegate
extends Object

Version-agnostic authenticator which encapsulates the core CAS workflow of redirecting to CAS for unauthenticated sessions and validating service tickets when found in the request. Implementations of the Tomcat Authenticator class are expected to be thin wrappers that delegate most if not all authentication logic to this class.

Since:
3.1.12
Version:
$Revision$
Author:
Marvin S. Addison

Constructor Summary
AuthenticatorDelegate()
           
 
Method Summary
 Principal authenticate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Performs CAS authentication on the given request and returns the principal determined by the configured CasRealm on success.
 String getCasServerLoginUrl()
           
 String getServerName()
           
 String getServiceUrl()
           
 void setArtifactParameterName(String artifactParameterName)
           
 void setCasServerLoginUrl(String casServerLoginUrl)
           
 void setRealm(CasRealm realm)
           
 void setServerName(String serverName)
           
 void setServiceParameterName(String serviceParameterName)
           
 void setServiceUrl(String serviceUrl)
           
 void setTicketValidator(TicketValidator ticketValidator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthenticatorDelegate

public AuthenticatorDelegate()
Method Detail

authenticate

public final Principal authenticate(javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response)
Performs CAS authentication on the given request and returns the principal determined by the configured CasRealm on success.

Parameters:
request - HTTP request.
response - HTTP response.
Returns:
The authenticated principal on authentication success, otherwise null. In the case where authentication explicitly fails, either due to ticket validation failure or realm authentication failure, a 403 status code is set on the response. In cases where no existing CAS session exists, a 302 redirect is set on the response to redirect to the CAS server for authentication.

getServiceUrl

public String getServiceUrl()
Returns:
the serviceUrl

setServiceUrl

public void setServiceUrl(String serviceUrl)
Parameters:
serviceUrl - the serviceUrl to set

getServerName

public String getServerName()
Returns:
the serverName

setServerName

public void setServerName(String serverName)
Parameters:
serverName - the serverName to set

getCasServerLoginUrl

public String getCasServerLoginUrl()
Returns:
the casServerLoginUrl

setCasServerLoginUrl

public void setCasServerLoginUrl(String casServerLoginUrl)
Parameters:
casServerLoginUrl - the casServerLoginUrl to set

setArtifactParameterName

public void setArtifactParameterName(String artifactParameterName)
Parameters:
artifactParameterName - the artifactParameterName to set

setServiceParameterName

public void setServiceParameterName(String serviceParameterName)
Parameters:
serviceParameterName - the serviceParameterName to set

setTicketValidator

public void setTicketValidator(TicketValidator ticketValidator)
Parameters:
ticketValidator - the ticketValidator to set

setRealm

public void setRealm(CasRealm realm)
Parameters:
realm - the realm to set


Copyright © 2006-2014 Jasig. All Rights Reserved.