C# Class NGM.CasClient.Client.Validation.TicketValidator.AbstractUrlTicketValidator

Abstract validator implementation for tickets that are validated against an Http server.
This is the .Net port of org.jasig.cas.client.validation.AbstractUrlBasedTicketValidator
Inheritance: ITicketValidator
Mostra file Open project: NIKASoftwareDevs/Orchard

Protected Properties

Property Type Description
CASServices ICasServices
UrlUtil IUrlUtil

Public Methods

Method Description
Initialize ( ) : void

Perform any initialization required for the UrlTicketValidator implementation.

Validate ( string ticket ) : ICasPrincipal

Attempts to validate a ticket for the provided service.

Protected Methods

Method Description
AbstractUrlTicketValidator ( ICasServices casServices, IUrlUtil urlUtil ) : System
ParseResponseFromServer ( string response, string ticket ) : ICasPrincipal

Parses the response from the server into a CAS Assertion and includes this in a CASPrincipal.

RetrieveResponseFromServer ( string validationUrl, string ticket ) : string

Default implementation that performs an HTTP GET request to the validation URL supplied with the supplied ticket and returns the response body as a string.

Method Details

AbstractUrlTicketValidator() protected method

protected AbstractUrlTicketValidator ( ICasServices casServices, IUrlUtil urlUtil ) : System
casServices ICasServices
urlUtil IUrlUtil
return System

Initialize() public abstract method

Perform any initialization required for the UrlTicketValidator implementation.
public abstract Initialize ( ) : void
return void

ParseResponseFromServer() protected abstract method

Parses the response from the server into a CAS Assertion and includes this in a CASPrincipal.
/// Thrown if creation of the Assertion fails. ///
protected abstract ParseResponseFromServer ( string response, string ticket ) : ICasPrincipal
response string /// the response from the server, in any format. ///
ticket string The ticket used to generate the validation response
return ICasPrincipal

RetrieveResponseFromServer() protected method

Default implementation that performs an HTTP GET request to the validation URL supplied with the supplied ticket and returns the response body as a string.
protected RetrieveResponseFromServer ( string validationUrl, string ticket ) : string
validationUrl string The validation URL to request
ticket string The ticket parameter to pass to the URL
return string

Validate() public method

Attempts to validate a ticket for the provided service.
/// Thrown if ticket validation fails. ///
public Validate ( string ticket ) : ICasPrincipal
ticket string the ticket to validate
return ICasPrincipal

Property Details

CASServices protected_oe property

protected ICasServices CASServices
return ICasServices

UrlUtil protected_oe property

protected IUrlUtil UrlUtil
return IUrlUtil