Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Derived from API version 2019-06-10
of the AWS service descriptions, licensed under Apache 2.0.
AWS Single Sign-On (SSO) OpenID Connect (OIDC) is a web service that enables a client (such as AWS CLI or a native application) to register with AWS SSO. The service also enables the client to fetch the user’s access token upon successful authentication and authorization with AWS SSO. This service conforms with the OAuth 2.0 based implementation of the device authorization grant standard (https://tools.ietf.org/html/rfc8628).
For general information about AWS SSO, see What is AWS Single Sign-On? in the AWS SSO User Guide.
This API reference guide describes the AWS SSO OIDC operations that you can call programatically and includes detailed information on data types and errors.
AWS provides SDKs that consist of libraries and sample code for various programming languages and platforms such as Java, Ruby, .Net, iOS, and Android. The SDKs provide a convenient way to create programmatic access to AWS SSO and other AWS services. For more information about the AWS SDKs, including how to download and install them, see Tools for Amazon Web Services.
Synopsis
- defaultService :: Service
- _AccessDeniedException :: AsError a => Getting (First ServiceError) a ServiceError
- _InvalidRequestException :: AsError a => Getting (First ServiceError) a ServiceError
- _InvalidScopeException :: AsError a => Getting (First ServiceError) a ServiceError
- _UnsupportedGrantTypeException :: AsError a => Getting (First ServiceError) a ServiceError
- _InvalidClientException :: AsError a => Getting (First ServiceError) a ServiceError
- _InvalidClientMetadataException :: AsError a => Getting (First ServiceError) a ServiceError
- _UnauthorizedClientException :: AsError a => Getting (First ServiceError) a ServiceError
- _SlowDownException :: AsError a => Getting (First ServiceError) a ServiceError
- _InternalServerException :: AsError a => Getting (First ServiceError) a ServiceError
- _InvalidGrantException :: AsError a => Getting (First ServiceError) a ServiceError
- _AuthorizationPendingException :: AsError a => Getting (First ServiceError) a ServiceError
- _ExpiredTokenException :: AsError a => Getting (First ServiceError) a ServiceError
- 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
- data CreateToken = CreateToken' (Maybe Text) (Maybe Text) (Maybe [Text]) (Maybe Text) Text Text Text Text
- newCreateToken :: Text -> Text -> Text -> Text -> CreateToken
- data CreateTokenResponse = CreateTokenResponse' (Maybe Text) (Maybe Text) (Maybe Int) (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 Integer) (Maybe Text) (Maybe Text) Int
- newRegisterClientResponse :: Int -> RegisterClientResponse
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 => Getting (First ServiceError) a ServiceError Source #
You do not have sufficient access to perform this action.
InvalidRequestException
_InvalidRequestException :: AsError a => Getting (First ServiceError) 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 => Getting (First ServiceError) a ServiceError Source #
Indicates that the scope provided in the request is invalid.
UnsupportedGrantTypeException
_UnsupportedGrantTypeException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Indicates that the grant type in the request is not supported by the service.
InvalidClientException
_InvalidClientException :: AsError a => Getting (First ServiceError) 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 => Getting (First ServiceError) a ServiceError Source #
Indicates that the client information sent in the request during registration is invalid.
UnauthorizedClientException
_UnauthorizedClientException :: AsError a => Getting (First ServiceError) 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.
SlowDownException
_SlowDownException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Indicates that the client is making the request too frequently and is more than the service can handle.
InternalServerException
_InternalServerException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Indicates that an error from the service occurred while trying to process a request.
InvalidGrantException
_InvalidGrantException :: AsError a => Getting (First ServiceError) 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.
AuthorizationPendingException
_AuthorizationPendingException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Indicates that a request to authorize a client with an access user session token is pending.
ExpiredTokenException
_ExpiredTokenException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Indicates that the token issued by the service is expired and is no longer valid.
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.
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 AWS
SSO. 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 SSO user portal. For more information, see
Using the User Portal
in the AWS Single Sign-On 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:userCode:StartDeviceAuthorizationResponse'
, startDeviceAuthorizationResponse_userCode
- A one-time user verification code. This is needed to authorize an in-use
device.
$sel:interval:StartDeviceAuthorizationResponse'
, startDeviceAuthorizationResponse_interval
- Indicates the number of seconds the client must wait between attempts
when polling for a session.
$sel:expiresIn:StartDeviceAuthorizationResponse'
, startDeviceAuthorizationResponse_expiresIn
- Indicates the number of seconds in which the verification code will
become invalid.
$sel:verificationUri:StartDeviceAuthorizationResponse'
, startDeviceAuthorizationResponse_verificationUri
- The URI of the verification page that takes the userCode
to authorize
the device.
$sel:deviceCode:StartDeviceAuthorizationResponse'
, startDeviceAuthorizationResponse_deviceCode
- The short-lived code that is used by the device when polling for a
session token.
$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.
CreateToken
data CreateToken Source #
See: newCreateToken
smart constructor.
Instances
:: Text | |
-> 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: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.
$sel:refreshToken:CreateToken'
, createToken_refreshToken
- 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.
$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: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: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 authorization code, refresh token, and device
code request.
$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.
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 AWS SSO resources assigned to a user.
$sel:refreshToken:CreateToken'
, createTokenResponse_refreshToken
- A token that, if present, can be used to refresh a previously issued
access token that might have expired.
$sel:expiresIn:CreateTokenResponse'
, createTokenResponse_expiresIn
- Indicates the time in seconds when an access token will expire.
$sel:tokenType:CreateTokenResponse'
, createTokenResponse_tokenType
- Used to notify the client that the returned token is an access token.
The supported type is BearerToken
.
$sel:idToken:CreateTokenResponse'
, createTokenResponse_idToken
- The identifier of the user that associated with the access token, if
present.
$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 Integer) (Maybe Text) (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: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: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:clientIdIssuedAt:RegisterClientResponse'
, registerClientResponse_clientIdIssuedAt
- Indicates the time at which the clientId
and clientSecret
were
issued.
$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:authorizationEndpoint:RegisterClientResponse'
, registerClientResponse_authorizationEndpoint
- The endpoint where the client can request authorization.
$sel:httpStatus:RegisterClientResponse'
, registerClientResponse_httpStatus
- The response's http status code.