Struct aws_sdk_ssooidc::client::Client
source · [−]pub struct Client<C = DynConnector, M = DefaultMiddleware, R = Standard> { /* private fields */ }
Expand description
Client for AWS SSO OIDC
Client for invoking operations on AWS SSO OIDC. Each operation on AWS SSO OIDC is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
Examples
Constructing a client and invoking an operation
// create a shared configuration. This can be used & shared between multiple service clients.
let shared_config = aws_config::load_from_env().await;
let client = aws_sdk_ssooidc::Client::new(&shared_config);
// invoke an operation
/* let rsp = client
.<operation_name>().
.<param>("some value")
.send().await; */
Constructing a client with custom configuration
use aws_config::RetryConfig;
let shared_config = aws_config::load_from_env().await;
let config = aws_sdk_ssooidc::config::Builder::from(&shared_config)
.retry_config(RetryConfig::disabled())
.build();
let client = aws_sdk_ssooidc::Client::from_conf(config);
Implementations
impl<C, M, R> Client<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
impl<C, M, R> Client<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
Constructs a fluent builder for the CreateToken
operation.
- The fluent builder is configurable:
client_id(impl Into<String>)
/set_client_id(Option<String>)
:The unique identifier string for each client. This value should come from the persisted result of the
RegisterClient
API.client_secret(impl Into<String>)
/set_client_secret(Option<String>)
:A secret string generated for the client. This value should come from the persisted result of the
RegisterClient
API.grant_type(impl Into<String>)
/set_grant_type(Option<String>)
:Supports grant types for authorization code, refresh token, and device code request.
device_code(impl Into<String>)
/set_device_code(Option<String>)
:Used only when calling this API for the device code grant type. This short-term code is used to identify this authentication attempt. This should come from an in-memory reference to the result of the
StartDeviceAuthorization
API.code(impl Into<String>)
/set_code(Option<String>)
:The authorization code received from the authorization service. This parameter is required to perform an authorization grant request to get access to a token.
refresh_token(impl Into<String>)
/set_refresh_token(Option<String>)
:The token used to obtain an access token in the event that the access token is invalid or expired. This token is not issued by the service.
scope(Vec<String>)
/set_scope(Option<Vec<String>>)
:The list of scopes that is defined by the client. Upon authorization, this list is used to restrict permissions when granting an access token.
redirect_uri(impl Into<String>)
/set_redirect_uri(Option<String>)
:The location of the application that will receive the authorization code. Users authorize the service to send the request to this location.
- On success, responds with
CreateTokenOutput
with field(s):access_token(Option<String>)
:An opaque token to access AWS SSO resources assigned to a user.
token_type(Option<String>)
:Used to notify the client that the returned token is an access token. The supported type is
BearerToken
.expires_in(i32)
:Indicates the time in seconds when an access token will expire.
refresh_token(Option<String>)
:A token that, if present, can be used to refresh a previously issued access token that might have expired.
id_token(Option<String>)
:The identifier of the user that associated with the access token, if present.
- On failure, responds with
SdkError<CreateTokenError>
Constructs a fluent builder for the RegisterClient
operation.
- The fluent builder is configurable:
client_name(impl Into<String>)
/set_client_name(Option<String>)
:The friendly name of the client.
client_type(impl Into<String>)
/set_client_type(Option<String>)
:The type of client. The service supports only
public
as a client type. Anything other than public will be rejected by the service.scopes(Vec<String>)
/set_scopes(Option<Vec<String>>)
:The list of scopes that are defined by the client. Upon authorization, this list is used to restrict permissions when granting an access token.
- On success, responds with
RegisterClientOutput
with field(s):client_id(Option<String>)
:The unique identifier string for each client. This client uses this identifier to get authenticated by the service in subsequent calls.
client_secret(Option<String>)
:A secret string generated for the client. The client will use this string to get authenticated by the service in subsequent calls.
client_id_issued_at(i64)
:Indicates the time at which the
clientId
andclientSecret
were issued.client_secret_expires_at(i64)
:Indicates the time at which the
clientId
andclientSecret
will become invalid.authorization_endpoint(Option<String>)
:The endpoint where the client can request authorization.
token_endpoint(Option<String>)
:The endpoint where the client can get an access token.
- On failure, responds with
SdkError<RegisterClientError>
Constructs a fluent builder for the StartDeviceAuthorization
operation.
- The fluent builder is configurable:
client_id(impl Into<String>)
/set_client_id(Option<String>)
:The unique identifier string for the client that is registered with AWS SSO. This value should come from the persisted result of the
RegisterClient
API operation.client_secret(impl Into<String>)
/set_client_secret(Option<String>)
:A secret string that is generated for the client. This value should come from the persisted result of the
RegisterClient
API operation.start_url(impl Into<String>)
/set_start_url(Option<String>)
:The URL for the AWS SSO user portal. For more information, see Using the User Portal in the AWS Single Sign-On User Guide.
- On success, responds with
StartDeviceAuthorizationOutput
with field(s):device_code(Option<String>)
:The short-lived code that is used by the device when polling for a session token.
user_code(Option<String>)
:A one-time user verification code. This is needed to authorize an in-use device.
verification_uri(Option<String>)
:The URI of the verification page that takes the
userCode
to authorize the device.verification_uri_complete(Option<String>)
:An alternate URL that the client can use to automatically launch a browser. This process skips the manual step in which the user visits the verification page and enters their code.
expires_in(i32)
:Indicates the number of seconds in which the verification code will become invalid.
interval(i32)
:Indicates the number of seconds the client must wait between attempts when polling for a session.
- On failure, responds with
SdkError<StartDeviceAuthorizationError>
Creates a client with the given service config and connector override.
Trait Implementations
Auto Trait Implementations
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !RefUnwindSafe for Client<C, M, R>
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !UnwindSafe for Client<C, M, R>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more