Class: Oidc::RequestObject
- Inherits:
-
ConnectObject
show all
- Includes:
- JWTnizable
- Defined in:
- lib/oidc/request_object.rb,
lib/oidc/request_object/id_token.rb,
lib/oidc/request_object/claimable.rb,
lib/oidc/request_object/user_info.rb
Defined Under Namespace
Modules: Claimable
Classes: IdToken, UserInfo
Instance Attribute Summary
#raw_attributes
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from JWTnizable
#as_jwt, #to_jwt
#all_attributes, all_attributes, #initialize, #require_at_least_one_attributes, #validate!
Class Method Details
.decode(jwt_string, key = nil) ⇒ Object
23
24
25
|
# File 'lib/oidc/request_object.rb', line 23
def decode(jwt_string, key = nil)
new JSON::JWT.decode(jwt_string, key)
end
|
.fetch(request_uri, key = nil) ⇒ Object
27
28
29
30
|
# File 'lib/oidc/request_object.rb', line 27
def fetch(request_uri, key = nil)
jwt_string = Oidc.http_client.get(request_uri).body
decode jwt_string, key
end
|
Instance Method Details
#as_json(options = {}) ⇒ Object
18
19
20
|
# File 'lib/oidc/request_object.rb', line 18
def as_json(options = {})
super.with_indifferent_access
end
|
#id_token=(attributes = {}) ⇒ Object
9
10
11
|
# File 'lib/oidc/request_object.rb', line 9
def id_token=(attributes = {})
@id_token = IdToken.new(attributes) if attributes.present?
end
|
#userinfo=(attributes = {}) ⇒ Object
14
15
16
|
# File 'lib/oidc/request_object.rb', line 14
def userinfo=(attributes = {})
@userinfo = UserInfo.new(attributes) if attributes.present?
end
|