Class: OmniAuth::Strategies::CAS3::ServiceTicketValidator
- Inherits:
-
Object
- Object
- OmniAuth::Strategies::CAS3::ServiceTicketValidator
- Defined in:
- lib/omniauth/strategies/cas3/service_ticket_validator.rb
Constant Summary collapse
- VALIDATION_REQUEST_HEADERS =
{ 'Accept' => '*/*' }
Instance Method Summary collapse
-
#call ⇒ Object
Executes a network request to process the CAS Service Response.
-
#initialize(strategy, options, return_to_url, ticket) ⇒ ServiceTicketValidator
constructor
Build a validator from a
configuration
, areturn_to
URL, and aticket
. -
#user_info ⇒ Hash?
Request validation of the ticket from the CAS server’s serviceValidate (CAS 2.0) function.
Constructor Details
#initialize(strategy, options, return_to_url, ticket) ⇒ ServiceTicketValidator
Build a validator from a configuration
, a return_to
URL, and a ticket
.
17 18 19 20 |
# File 'lib/omniauth/strategies/cas3/service_ticket_validator.rb', line 17 def initialize(strategy, , return_to_url, ticket) @options = @uri = URI.parse(strategy.service_validate_url(return_to_url, ticket)) end |
Instance Method Details
#call ⇒ Object
Executes a network request to process the CAS Service Response
23 24 25 26 27 |
# File 'lib/omniauth/strategies/cas3/service_ticket_validator.rb', line 23 def call @response_body = get_service_response_body @success_body = find_authentication_success(@response_body) self end |
#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).
37 38 39 |
# File 'lib/omniauth/strategies/cas3/service_ticket_validator.rb', line 37 def user_info parse_user_info(@success_body) end |