- create - Process Pushed Authorization Request
This API creates a pushed request authorization. It authenticates the client and creates a authorization_uri to be returned by the authorization server.
require 'authlete_ruby_sdk'
Models = ::Authlete::Models
s = ::Authlete::Client.new(
bearer: '<YOUR_BEARER_TOKEN_HERE>'
)
res = s.pushed_authorization.create(service_id: '<id>', pushed_authorization_request: Models::Components::PushedAuthorizationRequest.new(
parameters: 'response_type=code%20id_token&client_id=5921531358155430&redirect_uri=https%3A%2F%2Fserver.example.com%2Fcb&state=SOME_VALUE_ABLE_TO_PREVENT_CSRF&scope=openid&nonce=SOME_VALUE_ABLE_TO_PREVENT_REPLAY_ATTACK&code_challenge=5ZWDQJiryK3eaLtSeFV8y1XySMCWtyITxICLaTwvK8g&code_challenge_method=S256',
client_id: '5921531358155430',
client_secret: 'P_FouxWlI7zcOep_9vBwR9qMAVJQiCiUiK1HrAP4GziOyezHQpqY0f5dHXK4JT4tnvI51OkbWVoEM9GnOyJViA'
))
unless res.pushed_authorization_response.nil?
# handle response
end| Parameter | Type | Required | Description |
|---|---|---|---|
service_id |
::String | ✔️ | A service ID. |
pushed_authorization_request |
Models::Components::PushedAuthorizationRequest | ✔️ | N/A |
T.nilable(Models::Operations::PushedAuthReqApiResponse)
| Error Type | Status Code | Content Type |
|---|---|---|
| Models::Errors::ResultError | 400, 401, 403 | application/json |
| Models::Errors::ResultError | 500 | application/json |
| Errors::APIError | 4XX, 5XX | */* |