amazonka-cognito-idp-2.0: Amazon Cognito Identity Provider SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.CognitoIdentityProvider.SignUp

Description

Registers the user in the specified user pool and creates a user name, password, and user attributes.

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers require you to register an origination phone number before you can send SMS messages to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a phone number with Amazon Pinpoint. Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must receive SMS messages might not be able to sign up, activate their accounts, or sign in.

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service, Amazon Simple Notification Service might place your account in the SMS sandbox. In <https:docs.aws.amazon.comsnslatestdgsns-sms-sandbox.html sandbox mode> , you can send messages only to verified phone numbers. After you test your app while in the sandbox environment, you can move out of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito Developer Guide.

Synopsis

Creating a Request

data SignUp Source #

Represents the request to register a user.

See: newSignUp smart constructor.

Constructors

SignUp' 

Fields

  • analyticsMetadata :: Maybe AnalyticsMetadataType

    The Amazon Pinpoint analytics metadata that contributes to your metrics for SignUp calls.

  • clientMetadata :: Maybe (HashMap Text Text)

    A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

    You create custom workflows by assigning Lambda functions to user pool triggers. When you use the SignUp API action, Amazon Cognito invokes any functions that are assigned to the following triggers: pre sign-up, custom message, and post confirmation. When Amazon Cognito invokes any of these functions, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your SignUp request. In your function code in Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs.

    For more information, see Customizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

    When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:

    • Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.
    • Validate the ClientMetadata value.
    • Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.
  • secretHash :: Maybe (Sensitive Text)

    A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

  • userAttributes :: Maybe [AttributeType]

    An array of name-value pairs representing user attributes.

    For custom attributes, you must prepend the custom: prefix to the attribute name.

  • userContextData :: Maybe UserContextDataType

    Contextual data about your user session, such as the device fingerprint, IP address, or location. Amazon Cognito advanced security evaluates the risk of an authentication event based on the context that your app generates and passes to Amazon Cognito when it makes API requests.

  • validationData :: Maybe [AttributeType]

    The validation data in the request to register a user.

  • clientId :: Sensitive Text

    The ID of the client associated with the user pool.

  • username :: Sensitive Text

    The user name of the user you want to register.

  • password :: Sensitive Text

    The password of the user you want to register.

Instances

Instances details
ToJSON SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

ToHeaders SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

Methods

toHeaders :: SignUp -> [Header] #

ToPath SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

Methods

toPath :: SignUp -> ByteString #

ToQuery SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

AWSRequest SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

Associated Types

type AWSResponse SignUp #

Generic SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

Associated Types

type Rep SignUp :: Type -> Type #

Methods

from :: SignUp -> Rep SignUp x #

to :: Rep SignUp x -> SignUp #

Show SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

NFData SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

Methods

rnf :: SignUp -> () #

Eq SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

Methods

(==) :: SignUp -> SignUp -> Bool #

(/=) :: SignUp -> SignUp -> Bool #

Hashable SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

Methods

hashWithSalt :: Int -> SignUp -> Int #

hash :: SignUp -> Int #

type AWSResponse SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

type Rep SignUp Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

newSignUp Source #

Create a value of SignUp with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:analyticsMetadata:SignUp', signUp_analyticsMetadata - The Amazon Pinpoint analytics metadata that contributes to your metrics for SignUp calls.

$sel:clientMetadata:SignUp', signUp_clientMetadata - A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

You create custom workflows by assigning Lambda functions to user pool triggers. When you use the SignUp API action, Amazon Cognito invokes any functions that are assigned to the following triggers: pre sign-up, custom message, and post confirmation. When Amazon Cognito invokes any of these functions, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your SignUp request. In your function code in Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs.

For more information, see Customizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:

  • Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.
  • Validate the ClientMetadata value.
  • Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.

$sel:secretHash:SignUp', signUp_secretHash - A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

$sel:userAttributes:SignUp', signUp_userAttributes - An array of name-value pairs representing user attributes.

For custom attributes, you must prepend the custom: prefix to the attribute name.

$sel:userContextData:SignUp', signUp_userContextData - Contextual data about your user session, such as the device fingerprint, IP address, or location. Amazon Cognito advanced security evaluates the risk of an authentication event based on the context that your app generates and passes to Amazon Cognito when it makes API requests.

$sel:validationData:SignUp', signUp_validationData - The validation data in the request to register a user.

SignUp, signUp_clientId - The ID of the client associated with the user pool.

SignUp, signUp_username - The user name of the user you want to register.

$sel:password:SignUp', signUp_password - The password of the user you want to register.

Request Lenses

signUp_analyticsMetadata :: Lens' SignUp (Maybe AnalyticsMetadataType) Source #

The Amazon Pinpoint analytics metadata that contributes to your metrics for SignUp calls.

signUp_clientMetadata :: Lens' SignUp (Maybe (HashMap Text Text)) Source #

A map of custom key-value pairs that you can provide as input for any custom workflows that this action triggers.

You create custom workflows by assigning Lambda functions to user pool triggers. When you use the SignUp API action, Amazon Cognito invokes any functions that are assigned to the following triggers: pre sign-up, custom message, and post confirmation. When Amazon Cognito invokes any of these functions, it passes a JSON payload, which the function receives as input. This payload contains a clientMetadata attribute, which provides the data that you assigned to the ClientMetadata parameter in your SignUp request. In your function code in Lambda, you can process the clientMetadata value to enhance your workflow for your specific needs.

For more information, see Customizing user pool Workflows with Lambda Triggers in the Amazon Cognito Developer Guide.

When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the following:

  • Store the ClientMetadata value. This data is available only to Lambda triggers that are assigned to a user pool to support custom workflows. If your user pool configuration doesn't include triggers, the ClientMetadata parameter serves no purpose.
  • Validate the ClientMetadata value.
  • Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive information.

signUp_secretHash :: Lens' SignUp (Maybe Text) Source #

A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

signUp_userAttributes :: Lens' SignUp (Maybe [AttributeType]) Source #

An array of name-value pairs representing user attributes.

For custom attributes, you must prepend the custom: prefix to the attribute name.

signUp_userContextData :: Lens' SignUp (Maybe UserContextDataType) Source #

Contextual data about your user session, such as the device fingerprint, IP address, or location. Amazon Cognito advanced security evaluates the risk of an authentication event based on the context that your app generates and passes to Amazon Cognito when it makes API requests.

signUp_validationData :: Lens' SignUp (Maybe [AttributeType]) Source #

The validation data in the request to register a user.

signUp_clientId :: Lens' SignUp Text Source #

The ID of the client associated with the user pool.

signUp_username :: Lens' SignUp Text Source #

The user name of the user you want to register.

signUp_password :: Lens' SignUp Text Source #

The password of the user you want to register.

Destructuring the Response

data SignUpResponse Source #

The response from the server for a registration request.

See: newSignUpResponse smart constructor.

Constructors

SignUpResponse' 

Fields

Instances

Instances details
Generic SignUpResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

Associated Types

type Rep SignUpResponse :: Type -> Type #

Read SignUpResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

Show SignUpResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

NFData SignUpResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

Methods

rnf :: SignUpResponse -> () #

Eq SignUpResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

type Rep SignUpResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.SignUp

type Rep SignUpResponse = D1 ('MetaData "SignUpResponse" "Amazonka.CognitoIdentityProvider.SignUp" "amazonka-cognito-idp-2.0-D1ERgMvEVPG9z8cOLXdU2" 'False) (C1 ('MetaCons "SignUpResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "codeDeliveryDetails") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe CodeDeliveryDetailsType)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "userConfirmed") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "userSub") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newSignUpResponse Source #

Create a value of SignUpResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:codeDeliveryDetails:SignUpResponse', signUpResponse_codeDeliveryDetails - The code delivery details returned by the server response to the user registration request.

$sel:httpStatus:SignUpResponse', signUpResponse_httpStatus - The response's http status code.

$sel:userConfirmed:SignUpResponse', signUpResponse_userConfirmed - A response from the server indicating that a user registration has been confirmed.

$sel:userSub:SignUpResponse', signUpResponse_userSub - The UUID of the authenticated user. This isn't the same as username.

Response Lenses

signUpResponse_codeDeliveryDetails :: Lens' SignUpResponse (Maybe CodeDeliveryDetailsType) Source #

The code delivery details returned by the server response to the user registration request.

signUpResponse_httpStatus :: Lens' SignUpResponse Int Source #

The response's http status code.

signUpResponse_userConfirmed :: Lens' SignUpResponse Bool Source #

A response from the server indicating that a user registration has been confirmed.

signUpResponse_userSub :: Lens' SignUpResponse Text Source #

The UUID of the authenticated user. This isn't the same as username.