Nuxeo ECM Projects 5.6-RC1

edu.yale.its.tp.cas.client
Class ServiceTicketValidator

java.lang.Object
  extended by edu.yale.its.tp.cas.client.ServiceTicketValidator
Direct Known Subclasses:
ProxyTicketValidator

public class ServiceTicketValidator
extends Object

Validates STs and optionally retrieves PGT IOUs. Designed with a bean-like interface for simplicity and generality.


Constructor Summary
ServiceTicketValidator()
           
 
Method Summary
 String getCasValidateUrl()
          Gets the CAS validation URL to use when validating tickets and retrieving PGT IOUs.
 String getErrorCode()
          Returns CAS's error code if authentication failed.
 String getErrorMessage()
          Returns an error message if CAS authentication failed.
 String getPgtIou()
          Returns the PGT IOU returned by CAS.
 String getProxyCallbackUrl()
          Gets the callback URL, owned logically by the calling service, to receive the PGTid/PGTiou mapping.
 String getResponse()
          Retrieves CAS's entire response, if authentication was succsesful.
 String getUser()
          Returns the strongly authenticated username.
 boolean isAuthenticationSuccesful()
          Returns true if the most recent authentication attempted succeeded, false otherwise.
static void main(String[] args)
           
 void setCasValidateUrl(String x)
          Sets the CAS validation URL to use when validating tickets and retrieving PGT IOUs.
 void setProxyCallbackUrl(String x)
          Sets the callback URL, owned logically by the calling service, to receive the PGTid/PGTiou mapping.
 void setRenew(boolean b)
          Sets the "renew" flag on authentication.
 void setService(String x)
          Sets the service to use when validating.
 void setServiceTicket(String x)
          Sets the ST to validate.
 void validate()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceTicketValidator

public ServiceTicketValidator()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

setCasValidateUrl

public void setCasValidateUrl(String x)
Sets the CAS validation URL to use when validating tickets and retrieving PGT IOUs.


getCasValidateUrl

public String getCasValidateUrl()
Gets the CAS validation URL to use when validating tickets and retrieving PGT IOUs.


setProxyCallbackUrl

public void setProxyCallbackUrl(String x)
Sets the callback URL, owned logically by the calling service, to receive the PGTid/PGTiou mapping.


setRenew

public void setRenew(boolean b)
Sets the "renew" flag on authentication. When set to "true", authentication will only succeed if this was an initial login (forced by the "renew" flag being set on login).


getProxyCallbackUrl

public String getProxyCallbackUrl()
Gets the callback URL, owned logically by the calling service, to receive the PGTid/PGTiou mapping.


setServiceTicket

public void setServiceTicket(String x)
Sets the ST to validate.


setService

public void setService(String x)
Sets the service to use when validating.


getUser

public String getUser()
Returns the strongly authenticated username.


getPgtIou

public String getPgtIou()
Returns the PGT IOU returned by CAS.


isAuthenticationSuccesful

public boolean isAuthenticationSuccesful()
Returns true if the most recent authentication attempted succeeded, false otherwise.


getErrorMessage

public String getErrorMessage()
Returns an error message if CAS authentication failed.


getErrorCode

public String getErrorCode()
Returns CAS's error code if authentication failed.


getResponse

public String getResponse()
Retrieves CAS's entire response, if authentication was succsesful.


validate

public void validate()
              throws IOException,
                     SAXException,
                     ParserConfigurationException
Throws:
IOException
SAXException
ParserConfigurationException

Nuxeo ECM Projects 5.6-RC1

Copyright © 2012 Nuxeo SA. All Rights Reserved.