Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Amazonka.SSOOIDC.CreateToken
Description
Creates and returns an access token for the authorized client. The access token issued will be used to fetch short-term credentials for the assigned roles in the AWS account.
Synopsis
- data CreateToken = CreateToken' {}
- newCreateToken :: Text -> Text -> Text -> CreateToken
- createToken_code :: Lens' CreateToken (Maybe Text)
- createToken_deviceCode :: Lens' CreateToken (Maybe Text)
- createToken_redirectUri :: Lens' CreateToken (Maybe Text)
- createToken_refreshToken :: Lens' CreateToken (Maybe Text)
- createToken_scope :: Lens' CreateToken (Maybe [Text])
- createToken_clientId :: Lens' CreateToken Text
- createToken_clientSecret :: Lens' CreateToken Text
- createToken_grantType :: Lens' CreateToken Text
- data CreateTokenResponse = CreateTokenResponse' {}
- newCreateTokenResponse :: Int -> CreateTokenResponse
- createTokenResponse_accessToken :: Lens' CreateTokenResponse (Maybe Text)
- createTokenResponse_expiresIn :: Lens' CreateTokenResponse (Maybe Int)
- createTokenResponse_idToken :: Lens' CreateTokenResponse (Maybe Text)
- createTokenResponse_refreshToken :: Lens' CreateTokenResponse (Maybe Text)
- createTokenResponse_tokenType :: Lens' CreateTokenResponse (Maybe Text)
- createTokenResponse_httpStatus :: Lens' CreateTokenResponse Int
Creating a Request
data CreateToken Source #
See: newCreateToken
smart constructor.
Constructors
CreateToken' | |
Fields
|
Instances
Arguments
:: Text | |
-> Text | |
-> Text | |
-> CreateToken |
Create a value of CreateToken
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:code:CreateToken'
, createToken_code
- The authorization code received from the authorization service. This
parameter is required to perform an authorization grant request to get
access to a token.
$sel:deviceCode:CreateToken'
, createToken_deviceCode
- 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.
$sel:redirectUri:CreateToken'
, createToken_redirectUri
- The location of the application that will receive the authorization
code. Users authorize the service to send the request to this location.
CreateToken
, createToken_refreshToken
- Currently, refreshToken
is not yet implemented and is not supported.
For more information about the features and limitations of the current
IAM Identity Center OIDC implementation, see /Considerations for Using
this Guide/ in the
IAM Identity Center OIDC API Reference.
The token used to obtain an access token in the event that the access token is invalid or expired.
$sel:scope:CreateToken'
, createToken_scope
- The list of scopes that is defined by the client. Upon authorization,
this list is used to restrict permissions when granting an access token.
$sel:clientId:CreateToken'
, createToken_clientId
- The unique identifier string for each client. This value should come
from the persisted result of the RegisterClient API.
$sel:clientSecret:CreateToken'
, createToken_clientSecret
- A secret string generated for the client. This value should come from
the persisted result of the RegisterClient API.
$sel:grantType:CreateToken'
, createToken_grantType
- Supports grant types for the authorization code, refresh token, and
device code request. For device code requests, specify the following
value:
urn:ietf:params:oauth:grant-type:
device_code
For information about how to obtain the device code, see the StartDeviceAuthorization topic.
Request Lenses
createToken_code :: Lens' CreateToken (Maybe Text) Source #
The authorization code received from the authorization service. This parameter is required to perform an authorization grant request to get access to a token.
createToken_deviceCode :: Lens' CreateToken (Maybe Text) Source #
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.
createToken_redirectUri :: Lens' CreateToken (Maybe Text) Source #
The location of the application that will receive the authorization code. Users authorize the service to send the request to this location.
createToken_refreshToken :: Lens' CreateToken (Maybe Text) Source #
Currently, refreshToken
is not yet implemented and is not supported.
For more information about the features and limitations of the current
IAM Identity Center OIDC implementation, see /Considerations for Using
this Guide/ in the
IAM Identity Center OIDC API Reference.
The token used to obtain an access token in the event that the access token is invalid or expired.
createToken_scope :: Lens' CreateToken (Maybe [Text]) Source #
The list of scopes that is defined by the client. Upon authorization, this list is used to restrict permissions when granting an access token.
createToken_clientId :: Lens' CreateToken Text Source #
The unique identifier string for each client. This value should come from the persisted result of the RegisterClient API.
createToken_clientSecret :: Lens' CreateToken Text Source #
A secret string generated for the client. This value should come from the persisted result of the RegisterClient API.
createToken_grantType :: Lens' CreateToken Text Source #
Supports grant types for the authorization code, refresh token, and device code request. For device code requests, specify the following value:
urn:ietf:params:oauth:grant-type:
device_code
For information about how to obtain the device code, see the StartDeviceAuthorization topic.
Destructuring the Response
data CreateTokenResponse Source #
See: newCreateTokenResponse
smart constructor.
Constructors
CreateTokenResponse' | |
Fields
|
Instances
newCreateTokenResponse Source #
Arguments
:: Int | |
-> CreateTokenResponse |
Create a value of CreateTokenResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:accessToken:CreateTokenResponse'
, createTokenResponse_accessToken
- An opaque token to access IAM Identity Center resources assigned to a
user.
$sel:expiresIn:CreateTokenResponse'
, createTokenResponse_expiresIn
- Indicates the time in seconds when an access token will expire.
$sel:idToken:CreateTokenResponse'
, createTokenResponse_idToken
- Currently, idToken
is not yet implemented and is not supported. For
more information about the features and limitations of the current IAM
Identity Center OIDC implementation, see /Considerations for Using this
Guide/ in the
IAM Identity Center OIDC API Reference.
The identifier of the user that associated with the access token, if present.
CreateToken
, createTokenResponse_refreshToken
- Currently, refreshToken
is not yet implemented and is not supported.
For more information about the features and limitations of the current
IAM Identity Center OIDC implementation, see /Considerations for Using
this Guide/ in the
IAM Identity Center OIDC API Reference.
A token that, if present, can be used to refresh a previously issued access token that might have expired.
$sel:tokenType:CreateTokenResponse'
, createTokenResponse_tokenType
- Used to notify the client that the returned token is an access token.
The supported type is BearerToken
.
$sel:httpStatus:CreateTokenResponse'
, createTokenResponse_httpStatus
- The response's http status code.
Response Lenses
createTokenResponse_accessToken :: Lens' CreateTokenResponse (Maybe Text) Source #
An opaque token to access IAM Identity Center resources assigned to a user.
createTokenResponse_expiresIn :: Lens' CreateTokenResponse (Maybe Int) Source #
Indicates the time in seconds when an access token will expire.
createTokenResponse_idToken :: Lens' CreateTokenResponse (Maybe Text) Source #
Currently, idToken
is not yet implemented and is not supported. For
more information about the features and limitations of the current IAM
Identity Center OIDC implementation, see /Considerations for Using this
Guide/ in the
IAM Identity Center OIDC API Reference.
The identifier of the user that associated with the access token, if present.
createTokenResponse_refreshToken :: Lens' CreateTokenResponse (Maybe Text) Source #
Currently, refreshToken
is not yet implemented and is not supported.
For more information about the features and limitations of the current
IAM Identity Center OIDC implementation, see /Considerations for Using
this Guide/ in the
IAM Identity Center OIDC API Reference.
A token that, if present, can be used to refresh a previously issued access token that might have expired.
createTokenResponse_tokenType :: Lens' CreateTokenResponse (Maybe Text) Source #
Used to notify the client that the returned token is an access token.
The supported type is BearerToken
.
createTokenResponse_httpStatus :: Lens' CreateTokenResponse Int Source #
The response's http status code.