Amazon Cognito
Amazon Cognito is a web service that facilitates the delivery of
scoped, temporary credentials to mobile devices or other untrusted
environments. Amazon Cognito uniquely identifies a device or user
and supplies the user with a consistent identity throughout the
lifetime of an application.
Amazon Cognito lets users authenticate with third-party identity
providers (Facebook, Google, or Login with Amazon). As a
developer, you decide which identity providers to trust. You can
also choose to support unauthenticated access from your
application. Your users are provided with Cognito tokens that
uniquely identify their device and any information provided about
third-party logins.
-
APIVersion = '2014-06-30'
-
DefaultRegionEndpoint = 'cognito-identity.us-east-1.amazonaws.com'
-
DefaultRegionName = 'us-east-1'
-
ResponseError
alias of JSONResponseError
-
ServiceName = 'CognitoIdentity'
-
TargetPrefix = 'AWSCognitoIdentityService'
-
create_identity_pool(identity_pool_name, allow_unauthenticated_identities, supported_login_providers=None)
Creates a new identity pool. The identity pool is a store of
user identity information that is specific to your AWS
account.
Parameters: |
- identity_pool_name (string) – A string that you provide.
- allow_unauthenticated_identities (boolean) – TRUE if the identity pool
supports unauthenticated logins.
- supported_login_providers (map) – Optional key:value pairs mapping
provider names to provider app IDs.
|
-
delete_identity_pool(identity_pool_id)
Deletes a user pool. Once a pool is deleted, users will not be
able to authenticate with the pool.
Parameters: | identity_pool_id (string) – An identity pool ID in the format REGION:GUID. |
-
describe_identity_pool(identity_pool_id)
Gets details about a particular identity pool, including the
pool name, ID description, creation date, and current number
of users.
Parameters: | identity_pool_id (string) – An identity pool ID in the format REGION:GUID. |
-
get_id(account_id, identity_pool_id, logins=None)
Generates (or retrieves) a Cognito ID. Supplying multiple
logins will create an implicit linked account.
Parameters: |
- account_id (string) – A standard AWS account ID (9+ digits).
- identity_pool_id (string) – An identity pool ID in the format REGION:GUID.
- logins (map) – A set of optional name/value pairs that map provider
names to provider tokens.
|
-
get_open_id_token(identity_id, logins=None)
Gets an OpenID token, using a known Cognito ID. This known
Cognito ID is returned from GetId. You can optionally add
additional logins for the identity. Supplying multiple logins
creates an implicit link.
Parameters: |
- identity_id (string) – A unique identifier in the format REGION:GUID.
- logins (map) – A set of optional name/value pairs that map provider
names to provider tokens.
|
-
list_identities(identity_pool_id, max_results, next_token=None)
Lists the identities in a pool.
Parameters: |
- identity_pool_id (string) – An identity pool ID in the format REGION:GUID.
- max_results (integer) – The maximum number of identities to return.
- next_token (string) – A pagination token.
|
-
list_identity_pools(max_results, next_token=None)
Lists all of the Cognito identity pools registered for your
account.
Parameters: |
- max_results (integer) – The maximum number of identities to return.
- next_token (string) – A pagination token.
|
-
make_request(action, body)
-
unlink_identity(identity_id, logins, logins_to_remove)
Unlinks a federated identity from an existing account.
Unlinked logins will be considered new identities next time
they are seen. Removing the last linked login will make this
identity inaccessible.
Parameters: |
- identity_id (string) – A unique identifier in the format REGION:GUID.
- logins (map) – A set of optional name/value pairs that map provider
names to provider tokens.
- logins_to_remove (list) – Provider names to unlink from this identity.
|
-
update_identity_pool(identity_pool_id, identity_pool_name, allow_unauthenticated_identities, supported_login_providers=None)
Updates a user pool.
Parameters: |
- identity_pool_id (string) – An identity pool ID in the format REGION:GUID.
- identity_pool_name (string) – A string that you provide.
- allow_unauthenticated_identities (boolean) – TRUE if the identity pool
supports unauthenticated logins.
- supported_login_providers (map) – Optional key:value pairs mapping
provider names to provider app IDs.
|