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 |
Derived from API version 2019-06-10
of the AWS service descriptions, licensed under Apache 2.0.
AWS IAM Identity Center (successor to AWS Single Sign-On) OpenID Connect (OIDC) is a web service that enables a client (such as AWS CLI or a native application) to register with IAM Identity Center. The service also enables the client to fetch the user’s access token upon successful authentication and authorization with IAM Identity Center.
Although AWS Single Sign-On was renamed, the sso
and identitystore
API namespaces will continue to retain their original name for backward
compatibility purposes. For more information, see
IAM Identity Center rename.
Considerations for Using This Guide
Before you begin using this guide, we recommend that you first review the following important information about how the IAM Identity Center OIDC service works.
- The IAM Identity Center OIDC service currently implements only the portions of the OAuth 2.0 Device Authorization Grant standard (https://tools.ietf.org/html/rfc8628) that are necessary to enable single sign-on authentication with the AWS CLI. Support for other OIDC flows frequently needed for native applications, such as Authorization Code Flow (+ PKCE), will be addressed in future releases.
- The service emits only OIDC access tokens, such that obtaining a new token (For example, token refresh) requires explicit user re-authentication.
- The access tokens provided by this service grant access to all AWS account entitlements assigned to an IAM Identity Center user, not just a particular application.
- The documentation in this guide does not describe the mechanism to convert the access token into AWS Auth (“sigv4”) credentials for use with IAM-protected AWS service endpoints. For more information, see GetRoleCredentials in the IAM Identity Center Portal API Reference Guide.
For general information about IAM Identity Center, see What is IAM Identity Center? in the IAM Identity Center User Guide.
Synopsis
- defaultService :: Service
- _AccessDeniedException :: AsError a => Fold a ServiceError
- _AuthorizationPendingException :: AsError a => Fold a ServiceError
- _ExpiredTokenException :: AsError a => Fold a ServiceError
- _InternalServerException :: AsError a => Fold a ServiceError
- _InvalidClientException :: AsError a => Fold a ServiceError
- _InvalidClientMetadataException :: AsError a => Fold a ServiceError
- _InvalidGrantException :: AsError a => Fold a ServiceError
- _InvalidRequestException :: AsError a => Fold a ServiceError
- _InvalidScopeException :: AsError a => Fold a ServiceError
- _SlowDownException :: AsError a => Fold a ServiceError
- _UnauthorizedClientException :: AsError a => Fold a ServiceError
- _UnsupportedGrantTypeException :: AsError a => Fold a ServiceError
- data CreateToken = CreateToken' (Maybe Text) (Maybe Text) (Maybe Text) (Maybe Text) (Maybe [Text]) Text Text Text
- newCreateToken :: Text -> Text -> Text -> CreateToken
- data CreateTokenResponse = CreateTokenResponse' (Maybe Text) (Maybe Int) (Maybe Text) (Maybe Text) (Maybe Text) Int
- newCreateTokenResponse :: Int -> CreateTokenResponse
- data RegisterClient = RegisterClient' (Maybe [Text]) Text Text
- newRegisterClient :: Text -> Text -> RegisterClient
- data RegisterClientResponse = RegisterClientResponse' (Maybe Text) (Maybe Text) (Maybe Integer) (Maybe Text) (Maybe Integer) (Maybe Text) Int
- newRegisterClientResponse :: Int -> RegisterClientResponse
- data StartDeviceAuthorization = StartDeviceAuthorization' Text Text Text
- newStartDeviceAuthorization :: Text -> Text -> Text -> StartDeviceAuthorization
- data StartDeviceAuthorizationResponse = StartDeviceAuthorizationResponse' (Maybe Text) (Maybe Int) (Maybe Int) (Maybe Text) (Maybe Text) (Maybe Text) Int
- newStartDeviceAuthorizationResponse :: Int -> StartDeviceAuthorizationResponse
Service Configuration
defaultService :: Service Source #
API version 2019-06-10
of the Amazon SSO OIDC SDK configuration.
Errors
Error matchers are designed for use with the functions provided by
Control.Exception.Lens.
This allows catching (and rethrowing) service specific errors returned
by SSOOIDC
.
AccessDeniedException
_AccessDeniedException :: AsError a => Fold a ServiceError Source #
You do not have sufficient access to perform this action.
AuthorizationPendingException
_AuthorizationPendingException :: AsError a => Fold a ServiceError Source #
Indicates that a request to authorize a client with an access user session token is pending.
ExpiredTokenException
_ExpiredTokenException :: AsError a => Fold a ServiceError Source #
Indicates that the token issued by the service is expired and is no longer valid.
InternalServerException
_InternalServerException :: AsError a => Fold a ServiceError Source #
Indicates that an error from the service occurred while trying to process a request.
InvalidClientException
_InvalidClientException :: AsError a => Fold a ServiceError Source #
Indicates that the clientId
or clientSecret
in the request is
invalid. For example, this can occur when a client sends an incorrect
clientId
or an expired clientSecret
.
InvalidClientMetadataException
_InvalidClientMetadataException :: AsError a => Fold a ServiceError Source #
Indicates that the client information sent in the request during registration is invalid.
InvalidGrantException
_InvalidGrantException :: AsError a => Fold a ServiceError Source #
Indicates that a request contains an invalid grant. This can occur if a client makes a CreateToken request with an invalid grant type.
InvalidRequestException
_InvalidRequestException :: AsError a => Fold a ServiceError Source #
Indicates that something is wrong with the input to the request. For example, a required parameter might be missing or out of range.
InvalidScopeException
_InvalidScopeException :: AsError a => Fold a ServiceError Source #
Indicates that the scope provided in the request is invalid.
SlowDownException
_SlowDownException :: AsError a => Fold a ServiceError Source #
Indicates that the client is making the request too frequently and is more than the service can handle.
UnauthorizedClientException
_UnauthorizedClientException :: AsError a => Fold a ServiceError Source #
Indicates that the client is not currently authorized to make the
request. This can happen when a clientId
is not issued for a public
client.
UnsupportedGrantTypeException
_UnsupportedGrantTypeException :: AsError a => Fold a ServiceError Source #
Indicates that the grant type in the request is not supported by the service.
Waiters
Waiters poll by repeatedly sending a request until some remote success condition
configured by the Wait
specification is fulfilled. The Wait
specification
determines how many attempts should be made, in addition to delay and retry strategies.
Operations
Some AWS operations return results that are incomplete and require subsequent
requests in order to obtain the entire result set. The process of sending
subsequent requests to continue where a previous request left off is called
pagination. For example, the ListObjects
operation of Amazon S3 returns up to
1000 objects at a time, and you must send subsequent requests with the
appropriate Marker in order to retrieve the next page of results.
Operations that have an AWSPager
instance can transparently perform subsequent
requests, correctly setting Markers and other request facets to iterate through
the entire result set of a truncated API operation. Operations which support
this have an additional note in the documentation.
Many operations have the ability to filter results on the server side. See the individual operation parameters for details.
CreateToken
data CreateToken Source #
See: newCreateToken
smart constructor.
Instances
:: 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.
data CreateTokenResponse Source #
See: newCreateTokenResponse
smart constructor.
Instances
newCreateTokenResponse Source #
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.
RegisterClient
data RegisterClient Source #
See: newRegisterClient
smart constructor.
RegisterClient' (Maybe [Text]) Text Text |
Instances
Create a value of RegisterClient
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:scopes:RegisterClient'
, registerClient_scopes
- The list of scopes that are defined by the client. Upon authorization,
this list is used to restrict permissions when granting an access token.
$sel:clientName:RegisterClient'
, registerClient_clientName
- The friendly name of the client.
$sel:clientType:RegisterClient'
, registerClient_clientType
- The type of client. The service supports only public
as a client type.
Anything other than public will be rejected by the service.
data RegisterClientResponse Source #
See: newRegisterClientResponse
smart constructor.
RegisterClientResponse' (Maybe Text) (Maybe Text) (Maybe Integer) (Maybe Text) (Maybe Integer) (Maybe Text) Int |
Instances
newRegisterClientResponse Source #
Create a value of RegisterClientResponse
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:authorizationEndpoint:RegisterClientResponse'
, registerClientResponse_authorizationEndpoint
- The endpoint where the client can request authorization.
$sel:clientId:RegisterClientResponse'
, registerClientResponse_clientId
- The unique identifier string for each client. This client uses this
identifier to get authenticated by the service in subsequent calls.
$sel:clientIdIssuedAt:RegisterClientResponse'
, registerClientResponse_clientIdIssuedAt
- Indicates the time at which the clientId
and clientSecret
were
issued.
$sel:clientSecret:RegisterClientResponse'
, registerClientResponse_clientSecret
- A secret string generated for the client. The client will use this
string to get authenticated by the service in subsequent calls.
$sel:clientSecretExpiresAt:RegisterClientResponse'
, registerClientResponse_clientSecretExpiresAt
- Indicates the time at which the clientId
and clientSecret
will
become invalid.
$sel:tokenEndpoint:RegisterClientResponse'
, registerClientResponse_tokenEndpoint
- The endpoint where the client can get an access token.
$sel:httpStatus:RegisterClientResponse'
, registerClientResponse_httpStatus
- The response's http status code.
StartDeviceAuthorization
data StartDeviceAuthorization Source #
See: newStartDeviceAuthorization
smart constructor.
Instances
newStartDeviceAuthorization Source #
:: Text | |
-> Text | |
-> Text | |
-> StartDeviceAuthorization |
Create a value of StartDeviceAuthorization
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:clientId:StartDeviceAuthorization'
, startDeviceAuthorization_clientId
- The unique identifier string for the client that is registered with IAM
Identity Center. This value should come from the persisted result of the
RegisterClient API operation.
$sel:clientSecret:StartDeviceAuthorization'
, startDeviceAuthorization_clientSecret
- A secret string that is generated for the client. This value should come
from the persisted result of the RegisterClient API operation.
$sel:startUrl:StartDeviceAuthorization'
, startDeviceAuthorization_startUrl
- The URL for the AWS access portal. For more information, see
Using the AWS access portal
in the IAM Identity Center User Guide.
data StartDeviceAuthorizationResponse Source #
See: newStartDeviceAuthorizationResponse
smart constructor.
StartDeviceAuthorizationResponse' (Maybe Text) (Maybe Int) (Maybe Int) (Maybe Text) (Maybe Text) (Maybe Text) Int |
Instances
newStartDeviceAuthorizationResponse Source #
Create a value of StartDeviceAuthorizationResponse
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:deviceCode:StartDeviceAuthorizationResponse'
, startDeviceAuthorizationResponse_deviceCode
- The short-lived code that is used by the device when polling for a
session token.
$sel:expiresIn:StartDeviceAuthorizationResponse'
, startDeviceAuthorizationResponse_expiresIn
- Indicates the number of seconds in which the verification code will
become invalid.
$sel:interval:StartDeviceAuthorizationResponse'
, startDeviceAuthorizationResponse_interval
- Indicates the number of seconds the client must wait between attempts
when polling for a session.
$sel:userCode:StartDeviceAuthorizationResponse'
, startDeviceAuthorizationResponse_userCode
- A one-time user verification code. This is needed to authorize an in-use
device.
$sel:verificationUri:StartDeviceAuthorizationResponse'
, startDeviceAuthorizationResponse_verificationUri
- The URI of the verification page that takes the userCode
to authorize
the device.
$sel:verificationUriComplete:StartDeviceAuthorizationResponse'
, startDeviceAuthorizationResponse_verificationUriComplete
- 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.
$sel:httpStatus:StartDeviceAuthorizationResponse'
, startDeviceAuthorizationResponse_httpStatus
- The response's http status code.