|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.cas.client.validation.AbstractUrlBasedTicketValidator
public abstract class AbstractUrlBasedTicketValidator
Abstract validator implementation for tickets that must be validated against a server.
| Field Summary | |
|---|---|
protected org.apache.commons.logging.Log |
log
Commons Logging instance. |
| Constructor Summary | |
|---|---|
protected |
AbstractUrlBasedTicketValidator(java.lang.String casServerUrlPrefix)
Constructs a new TicketValidator with the casServerUrlPrefix. |
| Method Summary | |
|---|---|
protected java.lang.String |
constructValidationUrl(java.lang.String ticket,
java.lang.String serviceUrl)
Constructs the URL to send the validation request to. |
protected java.lang.String |
encodeUrl(java.lang.String url)
Encodes a URL using the URLEncoder format. |
protected abstract java.lang.String |
getUrlSuffix()
The endpoint of the validation URL. |
protected abstract Assertion |
parseResponseFromServer(java.lang.String response)
Parses the response from the server into a CAS Assertion. |
protected void |
populateUrlAttributeMap(java.util.Map urlParameters)
Template method for ticket validators that need to provide additional parameters to the validation url. |
protected abstract java.lang.String |
retrieveResponseFromServer(java.net.URL validationUrl,
java.lang.String ticket)
Contacts the CAS Server to retrieve the response for the ticket validation. |
void |
setCustomParameters(java.util.Map customParameters)
|
void |
setRenew(boolean renew)
|
Assertion |
validate(java.lang.String ticket,
java.lang.String service)
Attempts to validate a ticket for the provided service. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.apache.commons.logging.Log log
| Constructor Detail |
|---|
protected AbstractUrlBasedTicketValidator(java.lang.String casServerUrlPrefix)
casServerUrlPrefix - the location of the CAS server.| Method Detail |
|---|
protected void populateUrlAttributeMap(java.util.Map urlParameters)
urlParameters - the map containing the parameters.protected abstract java.lang.String getUrlSuffix()
protected final java.lang.String constructValidationUrl(java.lang.String ticket,
java.lang.String serviceUrl)
ticket - the ticket to be validated.serviceUrl - the service identifier.
protected final java.lang.String encodeUrl(java.lang.String url)
url - the url to encode.
protected abstract Assertion parseResponseFromServer(java.lang.String response)
throws TicketValidationException
response - the response from the server, in any format.
TicketValidationException - if an Assertion could not be created.
protected abstract java.lang.String retrieveResponseFromServer(java.net.URL validationUrl,
java.lang.String ticket)
validationUrl - the url to send the validation request to.ticket - the ticket to validate.
public Assertion validate(java.lang.String ticket,
java.lang.String service)
throws TicketValidationException
TicketValidator
validate in interface TicketValidatorticket - the ticket to attempt to validate.service - the service this ticket is valid for.
TicketValidationException - if the ticket cannot be validated.public void setRenew(boolean renew)
public void setCustomParameters(java.util.Map customParameters)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||