CognitoIdentity class

Amazon Cognito Federated Identities is a web service that delivers scoped temporary credentials to mobile devices and other untrusted environments. It uniquely identifies a device and supplies the user with a consistent identity over the lifetime of an application.

Constructors

CognitoIdentity({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → void
Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
createIdentityPool({required bool allowUnauthenticatedIdentities, required String identityPoolName, bool? allowClassicFlow, List<CognitoIdentityProvider>? cognitoIdentityProviders, String? developerProviderName, Map<String, String>? identityPoolTags, List<String>? openIdConnectProviderARNs, List<String>? samlProviderARNs, Map<String, String>? supportedLoginProviders}) Future<IdentityPool>
Creates a new identity pool. The identity pool is a store of user identity information that is specific to your AWS account. The keys for SupportedLoginProviders are as follows:
deleteIdentities({required List<String> identityIdsToDelete}) Future<DeleteIdentitiesResponse>
Deletes identities from an identity pool. You can specify a list of 1-60 identities that you want to delete.
deleteIdentityPool({required String identityPoolId}) Future<void>
Deletes an identity pool. Once a pool is deleted, users will not be able to authenticate with the pool.
describeIdentity({required String identityId}) Future<IdentityDescription>
Returns metadata related to the given identity, including when the identity was created and any associated linked logins.
describeIdentityPool({required String identityPoolId}) Future<IdentityPool>
Gets details about a particular identity pool, including the pool name, ID description, creation date, and current number of users.
getCredentialsForIdentity({required String identityId, String? customRoleArn, Map<String, String>? logins}) Future<GetCredentialsForIdentityResponse>
Returns credentials for the provided identity ID. Any provided logins will be validated against supported login providers. If the token is for cognito-identity.amazonaws.com, it will be passed through to AWS Security Token Service with the appropriate role for the token.
getId({required String identityPoolId, String? accountId, Map<String, String>? logins}) Future<GetIdResponse>
Generates (or retrieves) a Cognito ID. Supplying multiple logins will create an implicit linked account.
getIdentityPoolRoles({required String identityPoolId}) Future<GetIdentityPoolRolesResponse>
Gets the roles for an identity pool.
getOpenIdToken({required String identityId, Map<String, String>? logins}) Future<GetOpenIdTokenResponse>
Gets an OpenID token, using a known Cognito ID. This known Cognito ID is returned by GetId. You can optionally add additional logins for the identity. Supplying multiple logins creates an implicit link.
getOpenIdTokenForDeveloperIdentity({required String identityPoolId, required Map<String, String> logins, String? identityId, int? tokenDuration}) Future<GetOpenIdTokenForDeveloperIdentityResponse>
Registers (or retrieves) a Cognito IdentityId and an OpenID Connect token for a user authenticated by your backend authentication process. Supplying multiple logins will create an implicit linked account. You can only specify one developer provider as part of the Logins map, which is linked to the identity pool. The developer provider is the "domain" by which Cognito will refer to your users.
listIdentities({required String identityPoolId, required int maxResults, bool? hideDisabled, String? nextToken}) Future<ListIdentitiesResponse>
Lists the identities in an identity pool.
listIdentityPools({required int maxResults, String? nextToken}) Future<ListIdentityPoolsResponse>
Lists all of the Cognito identity pools registered for your account.
listTagsForResource({required String resourceArn}) Future<ListTagsForResourceResponse>
Lists the tags that are assigned to an Amazon Cognito identity pool.
lookupDeveloperIdentity({required String identityPoolId, String? developerUserIdentifier, String? identityId, int? maxResults, String? nextToken}) Future<LookupDeveloperIdentityResponse>
Retrieves the IdentityID associated with a DeveloperUserIdentifier or the list of DeveloperUserIdentifier values associated with an IdentityId for an existing identity. Either IdentityID or DeveloperUserIdentifier must not be null. If you supply only one of these values, the other value will be searched in the database and returned as a part of the response. If you supply both, DeveloperUserIdentifier will be matched against IdentityID. If the values are verified against the database, the response returns both values and is the same as the request. Otherwise a ResourceConflictException is thrown.
mergeDeveloperIdentities({required String destinationUserIdentifier, required String developerProviderName, required String identityPoolId, required String sourceUserIdentifier}) Future<MergeDeveloperIdentitiesResponse>
Merges two users having different IdentityIds, existing in the same identity pool, and identified by the same developer provider. You can use this action to request that discrete users be merged and identified as a single user in the Cognito environment. Cognito associates the given source user (SourceUserIdentifier) with the IdentityId of the DestinationUserIdentifier. Only developer-authenticated users can be merged. If the users to be merged are associated with the same public provider, but as two different users, an exception will be thrown.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setIdentityPoolRoles({required String identityPoolId, required Map<String, String> roles, Map<String, RoleMapping>? roleMappings}) Future<void>
Sets the roles for an identity pool. These roles are used when making calls to GetCredentialsForIdentity action.
tagResource({required String resourceArn, required Map<String, String> tags}) Future<void>
Assigns a set of tags to an Amazon Cognito identity pool. A tag is a label that you can use to categorize and manage identity pools in different ways, such as by purpose, owner, environment, or other criteria.
toString() String
A string representation of this object.
inherited
unlinkDeveloperIdentity({required String developerProviderName, required String developerUserIdentifier, required String identityId, required String identityPoolId}) Future<void>
Unlinks a DeveloperUserIdentifier from an existing identity. Unlinked developer users will be considered new identities next time they are seen. If, for a given Cognito identity, you remove all federated identities as well as the developer user identifier, the Cognito identity becomes inaccessible.
unlinkIdentity({required String identityId, required Map<String, String> logins, required List<String> loginsToRemove}) Future<void>
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.
untagResource({required String resourceArn, required List<String> tagKeys}) Future<void>
Removes the specified tags from an Amazon Cognito identity pool. You can use this action up to 5 times per second, per account
updateIdentityPool({required bool allowUnauthenticatedIdentities, required String identityPoolId, required String identityPoolName, bool? allowClassicFlow, List<CognitoIdentityProvider>? cognitoIdentityProviders, String? developerProviderName, Map<String, String>? identityPoolTags, List<String>? openIdConnectProviderARNs, List<String>? samlProviderARNs, Map<String, String>? supportedLoginProviders}) Future<IdentityPool>
Updates an identity pool.

Operators

operator ==(Object other) bool
The equality operator.
inherited