cognitoidentity

package
v0.0.0-...-d0813e5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package cognitoidentity provides a client for Amazon Cognito Identity.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CognitoIdentity

type CognitoIdentity struct {
	// contains filtered or unexported fields
}

CognitoIdentity is a client for Amazon Cognito Identity.

func New

func New(creds aws.CredentialsProvider, region string, client *http.Client) *CognitoIdentity

New returns a new CognitoIdentity client.

func (*CognitoIdentity) CreateIdentityPool

func (c *CognitoIdentity) CreateIdentityPool(req *CreateIdentityPoolInput) (resp *IdentityPool, err error)

CreateIdentityPool creates a new identity pool. The identity pool is a store of user identity information that is specific to your AWS account. The limit on identity pools is 60 per account.

func (*CognitoIdentity) DeleteIdentityPool

func (c *CognitoIdentity) DeleteIdentityPool(req *DeleteIdentityPoolInput) (err error)

DeleteIdentityPool deletes a user pool. Once a pool is deleted, users will not be able to authenticate with the pool.

func (*CognitoIdentity) DescribeIdentity

func (c *CognitoIdentity) DescribeIdentity(req *DescribeIdentityInput) (resp *IdentityDescription, err error)

DescribeIdentity returns metadata related to the given identity, including when the identity was created and any associated linked logins.

func (*CognitoIdentity) DescribeIdentityPool

func (c *CognitoIdentity) DescribeIdentityPool(req *DescribeIdentityPoolInput) (resp *IdentityPool, err error)

DescribeIdentityPool gets details about a particular identity pool, including the pool name, ID description, creation date, and current number of users.

func (*CognitoIdentity) GetCredentialsForIdentity

func (c *CognitoIdentity) GetCredentialsForIdentity(req *GetCredentialsForIdentityInput) (resp *GetCredentialsForIdentityResponse, err error)

GetCredentialsForIdentity returns credentials for the 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.

func (*CognitoIdentity) GetID

func (c *CognitoIdentity) GetID(req *GetIDInput) (resp *GetIDResponse, err error)

GetID generates (or retrieves) a Cognito ID. Supplying multiple logins will create an implicit linked account.

func (*CognitoIdentity) GetIdentityPoolRoles

func (c *CognitoIdentity) GetIdentityPoolRoles(req *GetIdentityPoolRolesInput) (resp *GetIdentityPoolRolesResponse, err error)

GetIdentityPoolRoles is undocumented.

func (*CognitoIdentity) GetOpenIDToken

func (c *CognitoIdentity) GetOpenIDToken(req *GetOpenIDTokenInput) (resp *GetOpenIDTokenResponse, err error)

GetOpenIDToken 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. The OpenId token is valid for 15 minutes.

func (*CognitoIdentity) GetOpenIDTokenForDeveloperIdentity

func (c *CognitoIdentity) GetOpenIDTokenForDeveloperIdentity(req *GetOpenIDTokenForDeveloperIdentityInput) (resp *GetOpenIDTokenForDeveloperIdentityResponse, err error)

GetOpenIDTokenForDeveloperIdentity 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. You can use GetOpenIdTokenForDeveloperIdentity to create a new identity and to link new logins (that is, user credentials issued by a public provider or developer provider) to an existing identity. When you want to create a new identity, the IdentityId should be null. When you want to associate a new login with an existing authenticated/unauthenticated identity, you can do so by providing the existing IdentityId . This API will create the identity in the specified IdentityPoolId

func (*CognitoIdentity) ListIdentities

func (c *CognitoIdentity) ListIdentities(req *ListIdentitiesInput) (resp *ListIdentitiesResponse, err error)

ListIdentities is undocumented.

func (*CognitoIdentity) ListIdentityPools

func (c *CognitoIdentity) ListIdentityPools(req *ListIdentityPoolsInput) (resp *ListIdentityPoolsResponse, err error)

ListIdentityPools lists all of the Cognito identity pools registered for your account.

func (*CognitoIdentity) LookupDeveloperIdentity

func (c *CognitoIdentity) LookupDeveloperIdentity(req *LookupDeveloperIdentityInput) (resp *LookupDeveloperIdentityResponse, err error)

LookupDeveloperIdentity retrieves the IdentityID associated with a DeveloperUserIdentifier or the list of DeveloperUserIdentifier s 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.

func (*CognitoIdentity) MergeDeveloperIdentities

func (c *CognitoIdentity) MergeDeveloperIdentities(req *MergeDeveloperIdentitiesInput) (resp *MergeDeveloperIdentitiesResponse, err error)

MergeDeveloperIdentities merges two users having different IdentityId s, 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.

func (*CognitoIdentity) SetIdentityPoolRoles

func (c *CognitoIdentity) SetIdentityPoolRoles(req *SetIdentityPoolRolesInput) (err error)

SetIdentityPoolRoles sets the roles for an identity pool. These roles are used when making calls to GetCredentialsForIdentity action.

func (*CognitoIdentity) UnlinkDeveloperIdentity

func (c *CognitoIdentity) UnlinkDeveloperIdentity(req *UnlinkDeveloperIdentityInput) (err error)

UnlinkDeveloperIdentity 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.

func (*CognitoIdentity) UnlinkIdentity

func (c *CognitoIdentity) UnlinkIdentity(req *UnlinkIdentityInput) (err error)

UnlinkIdentity 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.

func (*CognitoIdentity) UpdateIdentityPool

func (c *CognitoIdentity) UpdateIdentityPool(req *IdentityPool) (resp *IdentityPool, err error)

UpdateIdentityPool is undocumented.

type CognitoIdentityAPI

type CognitoIdentityAPI interface {
	CreateIdentityPool(req *CreateIdentityPoolInput) (resp *IdentityPool, err error)
	DeleteIdentityPool(req *DeleteIdentityPoolInput) (err error)
	DescribeIdentity(req *DescribeIdentityInput) (resp *IdentityDescription, err error)
	DescribeIdentityPool(req *DescribeIdentityPoolInput) (resp *IdentityPool, err error)
	GetCredentialsForIdentity(req *GetCredentialsForIdentityInput) (resp *GetCredentialsForIdentityResponse, err error)
	GetID(req *GetIDInput) (resp *GetIDResponse, err error)
	GetIdentityPoolRoles(req *GetIdentityPoolRolesInput) (resp *GetIdentityPoolRolesResponse, err error)
	GetOpenIDToken(req *GetOpenIDTokenInput) (resp *GetOpenIDTokenResponse, err error)
	GetOpenIDTokenForDeveloperIdentity(req *GetOpenIDTokenForDeveloperIdentityInput) (resp *GetOpenIDTokenForDeveloperIdentityResponse, err error)
	ListIdentities(req *ListIdentitiesInput) (resp *ListIdentitiesResponse, err error)
	ListIdentityPools(req *ListIdentityPoolsInput) (resp *ListIdentityPoolsResponse, err error)
	LookupDeveloperIdentity(req *LookupDeveloperIdentityInput) (resp *LookupDeveloperIdentityResponse, err error)
	MergeDeveloperIdentities(req *MergeDeveloperIdentitiesInput) (resp *MergeDeveloperIdentitiesResponse, err error)
	SetIdentityPoolRoles(req *SetIdentityPoolRolesInput) (err error)
	UnlinkDeveloperIdentity(req *UnlinkDeveloperIdentityInput) (err error)
	UnlinkIdentity(req *UnlinkIdentityInput) (err error)
	UpdateIdentityPool(req *IdentityPool) (resp *IdentityPool, err error)
}

type CreateIdentityPoolInput

type CreateIdentityPoolInput struct {
	AllowUnauthenticatedIdentities aws.BooleanValue  `json:"AllowUnauthenticatedIdentities"`
	DeveloperProviderName          aws.StringValue   `json:"DeveloperProviderName,omitempty"`
	IdentityPoolName               aws.StringValue   `json:"IdentityPoolName"`
	OpenIDConnectProviderARNs      []string          `json:"OpenIdConnectProviderARNs,omitempty"`
	SupportedLoginProviders        map[string]string `json:"SupportedLoginProviders,omitempty"`
}

CreateIdentityPoolInput is undocumented.

type Credentials

type Credentials struct {
	AccessKeyID  aws.StringValue `json:"AccessKeyId,omitempty"`
	Expiration   time.Time       `json:"Expiration,omitempty"`
	SecretKey    aws.StringValue `json:"SecretKey,omitempty"`
	SessionToken aws.StringValue `json:"SessionToken,omitempty"`
}

Credentials is undocumented.

type DeleteIdentityPoolInput

type DeleteIdentityPoolInput struct {
	IdentityPoolID aws.StringValue `json:"IdentityPoolId"`
}

DeleteIdentityPoolInput is undocumented.

type DescribeIdentityInput

type DescribeIdentityInput struct {
	IdentityID aws.StringValue `json:"IdentityId"`
}

DescribeIdentityInput is undocumented.

type DescribeIdentityPoolInput

type DescribeIdentityPoolInput struct {
	IdentityPoolID aws.StringValue `json:"IdentityPoolId"`
}

DescribeIdentityPoolInput is undocumented.

type GetCredentialsForIdentityInput

type GetCredentialsForIdentityInput struct {
	IdentityID aws.StringValue   `json:"IdentityId"`
	Logins     map[string]string `json:"Logins,omitempty"`
}

GetCredentialsForIdentityInput is undocumented.

type GetCredentialsForIdentityResponse

type GetCredentialsForIdentityResponse struct {
	Credentials *Credentials    `json:"Credentials,omitempty"`
	IdentityID  aws.StringValue `json:"IdentityId,omitempty"`
}

GetCredentialsForIdentityResponse is undocumented.

type GetIDInput

type GetIDInput struct {
	AccountID      aws.StringValue   `json:"AccountId,omitempty"`
	IdentityPoolID aws.StringValue   `json:"IdentityPoolId"`
	Logins         map[string]string `json:"Logins,omitempty"`
}

GetIDInput is undocumented.

type GetIDResponse

type GetIDResponse struct {
	IdentityID aws.StringValue `json:"IdentityId,omitempty"`
}

GetIDResponse is undocumented.

type GetIdentityPoolRolesInput

type GetIdentityPoolRolesInput struct {
	IdentityPoolID aws.StringValue `json:"IdentityPoolId,omitempty"`
}

GetIdentityPoolRolesInput is undocumented.

type GetIdentityPoolRolesResponse

type GetIdentityPoolRolesResponse struct {
	IdentityPoolID aws.StringValue   `json:"IdentityPoolId,omitempty"`
	Roles          map[string]string `json:"Roles,omitempty"`
}

GetIdentityPoolRolesResponse is undocumented.

type GetOpenIDTokenForDeveloperIdentityInput

type GetOpenIDTokenForDeveloperIdentityInput struct {
	IdentityID     aws.StringValue   `json:"IdentityId,omitempty"`
	IdentityPoolID aws.StringValue   `json:"IdentityPoolId"`
	Logins         map[string]string `json:"Logins"`
	TokenDuration  aws.LongValue     `json:"TokenDuration,omitempty"`
}

GetOpenIDTokenForDeveloperIdentityInput is undocumented.

type GetOpenIDTokenForDeveloperIdentityResponse

type GetOpenIDTokenForDeveloperIdentityResponse struct {
	IdentityID aws.StringValue `json:"IdentityId,omitempty"`
	Token      aws.StringValue `json:"Token,omitempty"`
}

GetOpenIDTokenForDeveloperIdentityResponse is undocumented.

type GetOpenIDTokenInput

type GetOpenIDTokenInput struct {
	IdentityID aws.StringValue   `json:"IdentityId"`
	Logins     map[string]string `json:"Logins,omitempty"`
}

GetOpenIDTokenInput is undocumented.

type GetOpenIDTokenResponse

type GetOpenIDTokenResponse struct {
	IdentityID aws.StringValue `json:"IdentityId,omitempty"`
	Token      aws.StringValue `json:"Token,omitempty"`
}

GetOpenIDTokenResponse is undocumented.

type IdentityDescription

type IdentityDescription struct {
	CreationDate     time.Time       `json:"CreationDate,omitempty"`
	IdentityID       aws.StringValue `json:"IdentityId,omitempty"`
	LastModifiedDate time.Time       `json:"LastModifiedDate,omitempty"`
	Logins           []string        `json:"Logins,omitempty"`
}

IdentityDescription is undocumented.

type IdentityPool

type IdentityPool struct {
	AllowUnauthenticatedIdentities aws.BooleanValue  `json:"AllowUnauthenticatedIdentities"`
	DeveloperProviderName          aws.StringValue   `json:"DeveloperProviderName,omitempty"`
	IdentityPoolID                 aws.StringValue   `json:"IdentityPoolId"`
	IdentityPoolName               aws.StringValue   `json:"IdentityPoolName"`
	OpenIDConnectProviderARNs      []string          `json:"OpenIdConnectProviderARNs,omitempty"`
	SupportedLoginProviders        map[string]string `json:"SupportedLoginProviders,omitempty"`
}

IdentityPool is undocumented.

type IdentityPoolShortDescription

type IdentityPoolShortDescription struct {
	IdentityPoolID   aws.StringValue `json:"IdentityPoolId,omitempty"`
	IdentityPoolName aws.StringValue `json:"IdentityPoolName,omitempty"`
}

IdentityPoolShortDescription is undocumented.

type ListIdentitiesInput

type ListIdentitiesInput struct {
	IdentityPoolID aws.StringValue  `json:"IdentityPoolId"`
	MaxResults     aws.IntegerValue `json:"MaxResults"`
	NextToken      aws.StringValue  `json:"NextToken,omitempty"`
}

ListIdentitiesInput is undocumented.

type ListIdentitiesResponse

type ListIdentitiesResponse struct {
	Identities     []IdentityDescription `json:"Identities,omitempty"`
	IdentityPoolID aws.StringValue       `json:"IdentityPoolId,omitempty"`
	NextToken      aws.StringValue       `json:"NextToken,omitempty"`
}

ListIdentitiesResponse is undocumented.

type ListIdentityPoolsInput

type ListIdentityPoolsInput struct {
	MaxResults aws.IntegerValue `json:"MaxResults"`
	NextToken  aws.StringValue  `json:"NextToken,omitempty"`
}

ListIdentityPoolsInput is undocumented.

type ListIdentityPoolsResponse

type ListIdentityPoolsResponse struct {
	IdentityPools []IdentityPoolShortDescription `json:"IdentityPools,omitempty"`
	NextToken     aws.StringValue                `json:"NextToken,omitempty"`
}

ListIdentityPoolsResponse is undocumented.

type LookupDeveloperIdentityInput

type LookupDeveloperIdentityInput struct {
	DeveloperUserIdentifier aws.StringValue  `json:"DeveloperUserIdentifier,omitempty"`
	IdentityID              aws.StringValue  `json:"IdentityId,omitempty"`
	IdentityPoolID          aws.StringValue  `json:"IdentityPoolId"`
	MaxResults              aws.IntegerValue `json:"MaxResults,omitempty"`
	NextToken               aws.StringValue  `json:"NextToken,omitempty"`
}

LookupDeveloperIdentityInput is undocumented.

type LookupDeveloperIdentityResponse

type LookupDeveloperIdentityResponse struct {
	DeveloperUserIdentifierList []string        `json:"DeveloperUserIdentifierList,omitempty"`
	IdentityID                  aws.StringValue `json:"IdentityId,omitempty"`
	NextToken                   aws.StringValue `json:"NextToken,omitempty"`
}

LookupDeveloperIdentityResponse is undocumented.

type MergeDeveloperIdentitiesInput

type MergeDeveloperIdentitiesInput struct {
	DestinationUserIdentifier aws.StringValue `json:"DestinationUserIdentifier"`
	DeveloperProviderName     aws.StringValue `json:"DeveloperProviderName"`
	IdentityPoolID            aws.StringValue `json:"IdentityPoolId"`
	SourceUserIdentifier      aws.StringValue `json:"SourceUserIdentifier"`
}

MergeDeveloperIdentitiesInput is undocumented.

type MergeDeveloperIdentitiesResponse

type MergeDeveloperIdentitiesResponse struct {
	IdentityID aws.StringValue `json:"IdentityId,omitempty"`
}

MergeDeveloperIdentitiesResponse is undocumented.

type SetIdentityPoolRolesInput

type SetIdentityPoolRolesInput struct {
	IdentityPoolID aws.StringValue   `json:"IdentityPoolId"`
	Roles          map[string]string `json:"Roles"`
}

SetIdentityPoolRolesInput is undocumented.

type UnlinkDeveloperIdentityInput

type UnlinkDeveloperIdentityInput struct {
	DeveloperProviderName   aws.StringValue `json:"DeveloperProviderName"`
	DeveloperUserIdentifier aws.StringValue `json:"DeveloperUserIdentifier"`
	IdentityID              aws.StringValue `json:"IdentityId"`
	IdentityPoolID          aws.StringValue `json:"IdentityPoolId"`
}

UnlinkDeveloperIdentityInput is undocumented.

type UnlinkIdentityInput

type UnlinkIdentityInput struct {
	IdentityID     aws.StringValue   `json:"IdentityId"`
	Logins         map[string]string `json:"Logins"`
	LoginsToRemove []string          `json:"LoginsToRemove"`
}

UnlinkIdentityInput is undocumented.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL