Class: OIDC::Response

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

Direct Known Subclasses

Okta::Response

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resp) ⇒ Response

Returns a new instance of Response.



7
8
9
10
# File 'lib/oidc/response.rb', line 7

def initialize(resp)
  @status = resp.status
  @body = resp.body
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



5
6
7
# File 'lib/oidc/response.rb', line 5

def body
  @body
end

#statusObject

Returns the value of attribute status.



5
6
7
# File 'lib/oidc/response.rb', line 5

def status
  @status
end

Instance Method Details

#success?Boolean Also known as: cache?

Returns:

  • (Boolean)


12
13
14
# File 'lib/oidc/response.rb', line 12

def success?
  status == 200 || status == 204
end