AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

AdminInitiateAuthInput

import "github.com/aws/aws-sdk-go/service/cognitoidentityprovider"

type AdminInitiateAuthInput struct { AnalyticsMetadata *AnalyticsMetadataType `type:"structure"` AuthFlow *string `type:"string" required:"true" enum:"AuthFlowType"` AuthParameters map[string]*string `type:"map"` ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` ClientMetadata map[string]*string `type:"map"` ContextData *ContextDataType `type:"structure"` UserPoolId *string `min:"1" type:"string" required:"true"` }

Initiates the authorization request, as an administrator.

AnalyticsMetadata

An Amazon Pinpoint analytics endpoint.

An endpoint uniquely identifies a mobile device, email address, or phone number that can receive messages from Amazon Pinpoint analytics.

AuthFlow

Type: *string

The authentication flow for this call to execute. The API action will depend on this value. For example:

  • REFRESH_TOKEN_AUTH will take in a valid refresh token and return new tokens.

  • USER_SRP_AUTH will take in USERNAME and SRP_A and return the SRP variables to be used for next challenge execution.

  • USER_PASSWORD_AUTH will take in USERNAME and PASSWORD and return the next challenge or tokens.

Valid values include:

  • USER_SRP_AUTH: Authentication flow for the Secure Remote Password (SRP) protocol.

  • REFRESH_TOKEN_AUTH/REFRESH_TOKEN: Authentication flow for refreshing the access token and ID token by supplying a valid refresh token.

  • CUSTOM_AUTH: Custom authentication flow.

  • ADMIN_NO_SRP_AUTH: Non-SRP authentication flow; you can pass in the USERNAME and PASSWORD directly if the flow is enabled for calling the app client.

  • USER_PASSWORD_AUTH: Non-SRP authentication flow; USERNAME and PASSWORD are passed directly. If a user migration Lambda trigger is set, this flow will invoke the user migration Lambda if the USERNAME is not found in the user pool.

AuthFlow is a required field

AuthParameters

Type: map[string]*string

The authentication parameters. These are inputs corresponding to the AuthFlow that you are invoking. The required values depend on the value of AuthFlow:

  • For USER_SRP_AUTH: USERNAME (required), SRP_A (required), SECRET_HASH

(required if the app client is configured with a client secret), DEVICE_KEY
  • For REFRESH_TOKEN_AUTH/REFRESH_TOKEN: REFRESH_TOKEN (required), SECRET_HASH

(required if the app client is configured with a client secret), DEVICE_KEY
  • For ADMIN_NO_SRP_AUTH: USERNAME (required), SECRET_HASH (if app client is configured with client secret), PASSWORD (required), DEVICE_KEY

  • For CUSTOM_AUTH: USERNAME (required), SECRET_HASH (if app client is configured with client secret), DEVICE_KEY

ClientId

Type: *string

The app client ID.

ClientId is a required field

ClientMetadata

Type: map[string]*string

This is a random key-value pair map which can contain any key and will be passed to your PreAuthentication Lambda trigger as-is. It can be used to implement additional validations around authentication.

ContextData

Contextual user data type used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

UserPoolId

Type: *string

The ID of the Amazon Cognito user pool.

UserPoolId is a required field

Method

GoString

func (s AdminInitiateAuthInput) GoString() string

GoString returns the string representation

SetAnalyticsMetadata

func (s *AdminInitiateAuthInput) SetAnalyticsMetadata(v *AnalyticsMetadataType) *AdminInitiateAuthInput

SetAnalyticsMetadata sets the AnalyticsMetadata field's value.

SetAuthFlow

func (s *AdminInitiateAuthInput) SetAuthFlow(v string) *AdminInitiateAuthInput

SetAuthFlow sets the AuthFlow field's value.

SetAuthParameters

func (s *AdminInitiateAuthInput) SetAuthParameters(v map[string]*string) *AdminInitiateAuthInput

SetAuthParameters sets the AuthParameters field's value.

SetClientId

func (s *AdminInitiateAuthInput) SetClientId(v string) *AdminInitiateAuthInput

SetClientId sets the ClientId field's value.

SetClientMetadata

func (s *AdminInitiateAuthInput) SetClientMetadata(v map[string]*string) *AdminInitiateAuthInput

SetClientMetadata sets the ClientMetadata field's value.

SetContextData

func (s *AdminInitiateAuthInput) SetContextData(v *ContextDataType) *AdminInitiateAuthInput

SetContextData sets the ContextData field's value.

SetUserPoolId

func (s *AdminInitiateAuthInput) SetUserPoolId(v string) *AdminInitiateAuthInput

SetUserPoolId sets the UserPoolId field's value.

String

func (s AdminInitiateAuthInput) String() string

String returns the string representation

Validate

func (s *AdminInitiateAuthInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: