Class: Cas::Client::Response
- Inherits:
-
Object
- Object
- Cas::Client::Response
- Defined in:
- lib/cas/client/response.rb
Instance Method Summary collapse
- #all_attributes ⇒ Object
-
#initialize(uri) ⇒ Response
constructor
A new instance of Response.
- #success? ⇒ Boolean
- #validate_service_response ⇒ Object
Constructor Details
#initialize(uri) ⇒ Response
Returns a new instance of Response.
4 5 6 7 |
# File 'lib/cas/client/response.rb', line 4 def initialize(uri) @request_uri = uri @response = nil end |
Instance Method Details
#all_attributes ⇒ Object
17 18 19 |
# File 'lib/cas/client/response.rb', line 17 def all_attributes get_user.merge!(get_extra_attributes) end |
#success? ⇒ Boolean
13 14 15 |
# File 'lib/cas/client/response.rb', line 13 def success? @response.to_s.match(/<#{xml_namespace}:authenticationSuccess>/) end |
#validate_service_response ⇒ Object
9 10 11 |
# File 'lib/cas/client/response.rb', line 9 def validate_service_response @response = Net::HTTP.get(@request_uri) end |