libZSservicesZSamazonka-cognito-idpZSamazonka-cognito-idp
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.CognitoIdentityProvider.AssociateSoftwareToken

Description

Returns a unique generated shared secret key code for the user account. The request takes an access token or a session string, but not both.

Calling AssociateSoftwareToken immediately disassociates the existing software token from the user account. If the user doesn't subsequently verify the software token, their account is essentially set up to authenticate without MFA. If MFA config is set to Optional at the user pool level, the user can then login without MFA. However, if MFA is set to Required for the user pool, the user will be asked to setup a new software token MFA during sign in.

Synopsis

Creating a Request

data AssociateSoftwareToken Source #

See: newAssociateSoftwareToken smart constructor.

Constructors

AssociateSoftwareToken' 

Fields

  • accessToken :: Maybe (Sensitive Text)

    The access token.

  • session :: Maybe Text

    The session which should be passed both ways in challenge-response calls to the service. This allows authentication of the user as part of the MFA setup process.

Instances

Instances details
Eq AssociateSoftwareToken Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.AssociateSoftwareToken

Show AssociateSoftwareToken Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.AssociateSoftwareToken

Generic AssociateSoftwareToken Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.AssociateSoftwareToken

Associated Types

type Rep AssociateSoftwareToken :: Type -> Type #

NFData AssociateSoftwareToken Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.AssociateSoftwareToken

Methods

rnf :: AssociateSoftwareToken -> () #

Hashable AssociateSoftwareToken Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.AssociateSoftwareToken

ToJSON AssociateSoftwareToken Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.AssociateSoftwareToken

AWSRequest AssociateSoftwareToken Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.AssociateSoftwareToken

Associated Types

type AWSResponse AssociateSoftwareToken #

ToHeaders AssociateSoftwareToken Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.AssociateSoftwareToken

ToPath AssociateSoftwareToken Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.AssociateSoftwareToken

ToQuery AssociateSoftwareToken Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.AssociateSoftwareToken

type Rep AssociateSoftwareToken Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.AssociateSoftwareToken

type Rep AssociateSoftwareToken = D1 ('MetaData "AssociateSoftwareToken" "Amazonka.CognitoIdentityProvider.AssociateSoftwareToken" "libZSservicesZSamazonka-cognito-idpZSamazonka-cognito-idp" 'False) (C1 ('MetaCons "AssociateSoftwareToken'" 'PrefixI 'True) (S1 ('MetaSel ('Just "accessToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Sensitive Text))) :*: S1 ('MetaSel ('Just "session") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))
type AWSResponse AssociateSoftwareToken Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.AssociateSoftwareToken

newAssociateSoftwareToken :: AssociateSoftwareToken Source #

Create a value of AssociateSoftwareToken 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:accessToken:AssociateSoftwareToken', associateSoftwareToken_accessToken - The access token.

$sel:session:AssociateSoftwareToken', associateSoftwareToken_session - The session which should be passed both ways in challenge-response calls to the service. This allows authentication of the user as part of the MFA setup process.

Request Lenses

associateSoftwareToken_session :: Lens' AssociateSoftwareToken (Maybe Text) Source #

The session which should be passed both ways in challenge-response calls to the service. This allows authentication of the user as part of the MFA setup process.

Destructuring the Response

data AssociateSoftwareTokenResponse Source #

See: newAssociateSoftwareTokenResponse smart constructor.

Constructors

AssociateSoftwareTokenResponse' 

Fields

  • secretCode :: Maybe (Sensitive Text)

    A unique generated shared secret code that is used in the TOTP algorithm to generate a one time code.

  • session :: Maybe Text

    The session which should be passed both ways in challenge-response calls to the service. This allows authentication of the user as part of the MFA setup process.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq AssociateSoftwareTokenResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.AssociateSoftwareToken

Show AssociateSoftwareTokenResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.AssociateSoftwareToken

Generic AssociateSoftwareTokenResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.AssociateSoftwareToken

Associated Types

type Rep AssociateSoftwareTokenResponse :: Type -> Type #

NFData AssociateSoftwareTokenResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.AssociateSoftwareToken

type Rep AssociateSoftwareTokenResponse Source # 
Instance details

Defined in Amazonka.CognitoIdentityProvider.AssociateSoftwareToken

type Rep AssociateSoftwareTokenResponse = D1 ('MetaData "AssociateSoftwareTokenResponse" "Amazonka.CognitoIdentityProvider.AssociateSoftwareToken" "libZSservicesZSamazonka-cognito-idpZSamazonka-cognito-idp" 'False) (C1 ('MetaCons "AssociateSoftwareTokenResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "secretCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Sensitive Text))) :*: (S1 ('MetaSel ('Just "session") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newAssociateSoftwareTokenResponse Source #

Create a value of AssociateSoftwareTokenResponse 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:secretCode:AssociateSoftwareTokenResponse', associateSoftwareTokenResponse_secretCode - A unique generated shared secret code that is used in the TOTP algorithm to generate a one time code.

$sel:session:AssociateSoftwareToken', associateSoftwareTokenResponse_session - The session which should be passed both ways in challenge-response calls to the service. This allows authentication of the user as part of the MFA setup process.

$sel:httpStatus:AssociateSoftwareTokenResponse', associateSoftwareTokenResponse_httpStatus - The response's http status code.

Response Lenses

associateSoftwareTokenResponse_secretCode :: Lens' AssociateSoftwareTokenResponse (Maybe Text) Source #

A unique generated shared secret code that is used in the TOTP algorithm to generate a one time code.

associateSoftwareTokenResponse_session :: Lens' AssociateSoftwareTokenResponse (Maybe Text) Source #

The session which should be passed both ways in challenge-response calls to the service. This allows authentication of the user as part of the MFA setup process.