Class: CasrackTheAuthenticator::ServiceTicketValidator
- Inherits:
-
Object
- Object
- CasrackTheAuthenticator::ServiceTicketValidator
- Defined in:
- lib/casrack_the_authenticator/service_ticket_validator.rb
Constant Summary collapse
- VALIDATION_REQUEST_HEADERS =
{ 'Accept' => '*/*' }
Instance Method Summary collapse
-
#initialize(configuration, return_to_url, ticket) ⇒ ServiceTicketValidator
constructor
Build a validator from a
configuration
, areturn_to
URL, and aticket
. -
#user ⇒ String?
Request validation of the ticket from the CAS server’s serviceValidate (CAS 2.0) function.
Constructor Details
#initialize(configuration, return_to_url, ticket) ⇒ ServiceTicketValidator
Build a validator from a configuration
, a return_to
URL, and a ticket
.
15 16 17 |
# File 'lib/casrack_the_authenticator/service_ticket_validator.rb', line 15 def initialize(configuration, return_to_url, ticket) @uri = URI.parse(configuration.service_validate_url(return_to_url, ticket)) end |
Instance Method Details
#user ⇒ String?
Request validation of the ticket from the CAS server’s serviceValidate (CAS 2.0) function.
Swallows all XML parsing errors (and returns nil
in those cases).
27 28 29 |
# File 'lib/casrack_the_authenticator/service_ticket_validator.rb', line 27 def user parse_user(get_validation_response_body) end |