| Copyright | (c) 2013-2018 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | None |
| Language | Haskell2010 |
Network.AWS.CognitoIdentityProvider.ForgotPassword
Description
Calling this API causes a message to be sent to the end user with a confirmation code that is required to change the user's password. For the Username parameter, you can use the username or user alias. If a verified phone number exists for the user, the confirmation code is sent to the phone number. Otherwise, if a verified email exists, the confirmation code is sent to the email. If neither a verified phone number nor a verified email exists, InvalidParameterException is thrown. To use the confirmation code for resetting the password, call .
- forgotPassword :: Text -> Text -> ForgotPassword
- data ForgotPassword
- fpAnalyticsMetadata :: Lens' ForgotPassword (Maybe AnalyticsMetadataType)
- fpUserContextData :: Lens' ForgotPassword (Maybe UserContextDataType)
- fpSecretHash :: Lens' ForgotPassword (Maybe Text)
- fpClientId :: Lens' ForgotPassword Text
- fpUsername :: Lens' ForgotPassword Text
- forgotPasswordResponse :: Int -> ForgotPasswordResponse
- data ForgotPasswordResponse
- fprsCodeDeliveryDetails :: Lens' ForgotPasswordResponse (Maybe CodeDeliveryDetailsType)
- fprsResponseStatus :: Lens' ForgotPasswordResponse Int
Creating a Request
Arguments
| :: Text | |
| -> Text | |
| -> ForgotPassword |
Creates a value of ForgotPassword with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
fpAnalyticsMetadata- The Amazon Pinpoint analytics metadata for collecting metrics forForgotPasswordcalls.fpUserContextData- 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.fpSecretHash- 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.fpClientId- The ID of the client associated with the user pool.fpUsername- The user name of the user for whom you want to enter a code to reset a forgotten password.
data ForgotPassword Source #
Represents the request to reset a user's password.
See: forgotPassword smart constructor.
Instances
Request Lenses
fpAnalyticsMetadata :: Lens' ForgotPassword (Maybe AnalyticsMetadataType) Source #
The Amazon Pinpoint analytics metadata for collecting metrics for ForgotPassword calls.
fpUserContextData :: Lens' ForgotPassword (Maybe UserContextDataType) Source #
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.
fpSecretHash :: Lens' ForgotPassword (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.
fpClientId :: Lens' ForgotPassword Text Source #
The ID of the client associated with the user pool.
fpUsername :: Lens' ForgotPassword Text Source #
The user name of the user for whom you want to enter a code to reset a forgotten password.
Destructuring the Response
forgotPasswordResponse Source #
Arguments
| :: Int | |
| -> ForgotPasswordResponse |
Creates a value of ForgotPasswordResponse with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
fprsCodeDeliveryDetails- The code delivery details returned by the server in response to the request to reset a password.fprsResponseStatus- -- | The response status code.
data ForgotPasswordResponse Source #
Respresents the response from the server regarding the request to reset a password.
See: forgotPasswordResponse smart constructor.
Response Lenses
fprsCodeDeliveryDetails :: Lens' ForgotPasswordResponse (Maybe CodeDeliveryDetailsType) Source #
The code delivery details returned by the server in response to the request to reset a password.
fprsResponseStatus :: Lens' ForgotPasswordResponse Int Source #
- - | The response status code.