Class: OmniAuth::Strategies::CAS::ServiceTicketValidator
- Inherits:
-
Object
- Object
- OmniAuth::Strategies::CAS::ServiceTicketValidator
- Defined in:
- lib/omniauth/strategies/cas/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+, a +return_to+ URL, and a +ticket+.
-
#user_info ⇒ Hash?
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+.
18 19 20 21 |
# File 'lib/omniauth/strategies/cas/service_ticket_validator.rb', line 18 def initialize(configuration, return_to_url, ticket) @configuration = configuration @uri = URI.parse(@configuration.service_validate_url(return_to_url, ticket)) end |
Instance Method Details
#user_info ⇒ Hash?
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).
31 32 33 |
# File 'lib/omniauth/strategies/cas/service_ticket_validator.rb', line 31 def user_info parse_user_info(find_authentication_success(get_service_response_body)) end |