Class: Cas::Client::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/cas/client/response.rb

Instance Method Summary collapse

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_attributesObject



17
18
19
# File 'lib/cas/client/response.rb', line 17

def all_attributes
  get_user.merge!(get_extra_attributes)
end

#success?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/cas/client/response.rb', line 13

def success?
  @response.to_s.match(/<#{xml_namespace}:authenticationSuccess>/)
end

#validate_service_responseObject



9
10
11
# File 'lib/cas/client/response.rb', line 9

def validate_service_response
  @response = Net::HTTP.get(@request_uri)
end