Class: AnswerLayer::IdentityBrokerResource
- Inherits:
-
Resource
- Object
- Resource
- AnswerLayer::IdentityBrokerResource
show all
- Defined in:
- lib/answerlayer/resources/identity_broker.rb
Constant Summary
collapse
- SUBJECT_TOKEN_TYPE =
"urn:ietf:params:oauth:token-type:jwt"
Instance Method Summary
collapse
Methods inherited from Resource
#initialize
Instance Method Details
#exchange_token(subject_token:, subject_token_type: SUBJECT_TOKEN_TYPE) ⇒ Object
7
8
9
10
11
12
13
|
# File 'lib/answerlayer/resources/identity_broker.rb', line 7
def exchange_token(subject_token:, subject_token_type: SUBJECT_TOKEN_TYPE)
to_api_response(request(method: :post, path: "/oauth/token", auth: :oauth, form: {
grant_type: "urn:ietf:params:oauth:grant-type:token-exchange",
subject_token: subject_token,
subject_token_type: subject_token_type
}))
end
|
#jwks ⇒ Object
15
16
17
|
# File 'lib/answerlayer/resources/identity_broker.rb', line 15
def jwks
to_api_response(request(method: :get, path: "/.well-known/jwks.json", auth: :none))
end
|