Class Cas10RoleParsingTicketValidator
java.lang.Object
org.apereo.cas.client.validation.AbstractUrlBasedTicketValidator
org.apereo.cas.client.validation.AbstractCasProtocolUrlBasedTicketValidator
org.jenkinsci.plugins.cas.validation.Cas10RoleParsingTicketValidator
- All Implemented Interfaces:
org.apereo.cas.client.validation.TicketValidator
public class Cas10RoleParsingTicketValidator
extends org.apereo.cas.client.validation.AbstractCasProtocolUrlBasedTicketValidator
Implementation of a Ticket Validator that can validate tickets conforming to the CAS 1.0 specification.
This implementation also allows parsing roles from a custom extension with a Groovy script.
- Author:
- Scott Battaglia, Fabien Crespel
-
Field Summary
Fields inherited from class org.apereo.cas.client.validation.AbstractUrlBasedTicketValidator
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript
protected String
protected org.apereo.cas.client.validation.Assertion
parseResponseFromServer
(String response) parseRolesFromValidationResponse
(org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript script, String response) Parse roles from a custom CAS 1.0 validation response.void
setRolesAttribute
(String rolesAttribute) void
setRolesValidationScript
(org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript rolesValidationScript) Methods inherited from class org.apereo.cas.client.validation.AbstractCasProtocolUrlBasedTicketValidator
retrieveResponseFromServer
Methods inherited from class org.apereo.cas.client.validation.AbstractUrlBasedTicketValidator
constructValidationUrl, encodeUrl, getCasServerUrlPrefix, getCustomParameters, getEncoding, getURLConnectionFactory, isRenew, populateUrlAttributeMap, setCustomParameters, setEncoding, setRenew, setURLConnectionFactory, validate
-
Field Details
-
DEFAULT_ROLE_ATTRIBUTE
- See Also:
-
-
Constructor Details
-
Cas10RoleParsingTicketValidator
-
-
Method Details
-
getUrlSuffix
- Specified by:
getUrlSuffix
in classorg.apereo.cas.client.validation.AbstractUrlBasedTicketValidator
-
parseResponseFromServer
protected org.apereo.cas.client.validation.Assertion parseResponseFromServer(String response) throws org.apereo.cas.client.validation.TicketValidationException - Specified by:
parseResponseFromServer
in classorg.apereo.cas.client.validation.AbstractUrlBasedTicketValidator
- Throws:
org.apereo.cas.client.validation.TicketValidationException
-
parseRolesFromValidationResponse
public static List<String> parseRolesFromValidationResponse(org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript script, String response) throws Exception Parse roles from a custom CAS 1.0 validation response.- Parameters:
script
- Groovy roles validation scriptresponse
- validation response from the CAS server- Returns:
- list of roles
- Throws:
Exception
-
getRolesValidationScript
public org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript getRolesValidationScript()- Returns:
- the rolesValidationScript
-
setRolesValidationScript
public void setRolesValidationScript(org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript rolesValidationScript) - Parameters:
rolesValidationScript
- the rolesValidationScript to set
-
getRolesAttribute
- Returns:
- the rolesAttribute
-
setRolesAttribute
- Parameters:
rolesAttribute
- the rolesAttribute to set
-