Class: Aws::Signin::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::Signin::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-signin/client.rb
Overview
An API client for Signin. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::Signin::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
Attributes inherited from Seahorse::Client::Base
API Operations collapse
-
#create_o_auth_2_token(params = {}) ⇒ Types::CreateOAuth2TokenResponse
CreateOAuth2Token API.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Methods included from ClientStubs
#api_requests, #next_stub, #setup_stubbing, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, #inspect, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response, #handler_for, #new_handler
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
473 474 475 |
# File 'lib/aws-sdk-signin/client.rb', line 473 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
595 596 597 |
# File 'lib/aws-sdk-signin/client.rb', line 595 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
598 599 600 |
# File 'lib/aws-sdk-signin/client.rb', line 598 def errors_module Errors end |
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 |
# File 'lib/aws-sdk-signin/client.rb', line 568 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::Signin') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-core' context[:gem_version] = '3.239.2' Seahorse::Client::Request.new(handlers, context) end |
#create_o_auth_2_token(params = {}) ⇒ Types::CreateOAuth2TokenResponse
CreateOAuth2Token API
Path: /v1/token Request Method: POST Content-Type: application/json or application/x-www-form-urlencoded
This API implements OAuth 2.0 flows for AWS Sign-In CLI clients, supporting both:
-
Authorization code redemption (grant_type=authorization_code) - NOT idempotent
-
Token refresh (grant_type=refresh_token) - Idempotent within token validity window
The operation behavior is determined by the grant_type parameter in the request body:
**Authorization Code Flow (NOT Idempotent):**
-
JSON or form-encoded body with client_id, grant_type=authorization_code, code, redirect_uri, code_verifier
-
Returns access_token, token_type, expires_in, refresh_token, and id_token
-
Each authorization code can only be used ONCE for security (prevents replay attacks)
**Token Refresh Flow (Idempotent):**
-
JSON or form-encoded body with client_id, grant_type=refresh_token, refresh_token
-
Returns access_token, token_type, expires_in, and refresh_token (no id_token)
-
Multiple calls with same refresh_token return consistent results within validity window
Authentication and authorization:
-
Confidential clients: sigv4 signing required with signin:ExchangeToken permissions
-
CLI clients (public): authn/authz skipped based on client_id & grant_type
Note: This operation cannot be marked as @idempotent because it handles both idempotent (token refresh) and non-idempotent (auth code redemption) flows in a single endpoint.
559 560 561 562 |
# File 'lib/aws-sdk-signin/client.rb', line 559 def create_o_auth_2_token(params = {}, = {}) req = build_request(:create_o_auth_2_token, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
588 589 590 |
# File 'lib/aws-sdk-signin/client.rb', line 588 def waiter_names [] end |