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 Attribute Summary collapse
-
#success_body ⇒ Object
readonly
Returns the value of attribute success_body.
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
.
19 20 21 22 |
# File 'lib/omniauth/strategies/cas/service_ticket_validator.rb', line 19 def initialize(strategy, , return_to_url, ticket) @options = @uri = URI.parse(strategy.service_validate_url(return_to_url, ticket)) end |
Instance Attribute Details
#success_body ⇒ Object (readonly)
Returns the value of attribute success_body.
11 12 13 |
# File 'lib/omniauth/strategies/cas/service_ticket_validator.rb', line 11 def success_body @success_body end |
Instance Method Details
#call ⇒ Object
Executes a network request to process the CAS Service Response
25 26 27 28 29 |
# File 'lib/omniauth/strategies/cas/service_ticket_validator.rb', line 25 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).
39 40 41 |
# File 'lib/omniauth/strategies/cas/service_ticket_validator.rb', line 39 def user_info parse_user_info(@success_body) end |