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.

InitiateAuthInput

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

type InitiateAuthInput 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"` UserContextData *UserContextDataType `type:"structure"` }

Initiates the authentication request.

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.

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

ADMIN_NO_SRP_AUTH is not a valid value.

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

UserContextData

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

Method

GoString

func (s InitiateAuthInput) GoString() string

GoString returns the string representation

SetAnalyticsMetadata

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

SetAnalyticsMetadata sets the AnalyticsMetadata field's value.

SetAuthFlow

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

SetAuthFlow sets the AuthFlow field's value.

SetAuthParameters

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

SetAuthParameters sets the AuthParameters field's value.

SetClientId

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

SetClientId sets the ClientId field's value.

SetClientMetadata

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

SetClientMetadata sets the ClientMetadata field's value.

SetUserContextData

func (s *InitiateAuthInput) SetUserContextData(v *UserContextDataType) *InitiateAuthInput

SetUserContextData sets the UserContextData field's value.

String

func (s InitiateAuthInput) String() string

String returns the string representation

Validate

func (s *InitiateAuthInput) Validate() error

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

On this page: