public class VerifySoftwareTokenRequest
extends com.amazonaws.AmazonWebServiceRequest
implements java.io.Serializable
Use this API to register a user's entered time-based one-time password (TOTP) code and mark the user's software token MFA status as "verified" if successful. The request takes an access token or a session string, but not both.
Amazon Cognito doesn't evaluate Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you can't use IAM credentials to authorize requests, and you can't grant IAM permissions in policies. For more information about authorization models in Amazon Cognito, see Using the Amazon Cognito native and OIDC APIs.
| Constructor and Description |
|---|
VerifySoftwareTokenRequest() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAccessToken()
A valid access token that Amazon Cognito issued to the user whose
software token you want to verify.
|
java.lang.String |
getFriendlyDeviceName()
The friendly device name.
|
java.lang.String |
getSession()
The session that should be passed both ways in challenge-response calls
to the service.
|
java.lang.String |
getUserCode()
The one- time password computed using the secret code returned by AssociateSoftwareToken.
|
int |
hashCode() |
void |
setAccessToken(java.lang.String accessToken)
A valid access token that Amazon Cognito issued to the user whose
software token you want to verify.
|
void |
setFriendlyDeviceName(java.lang.String friendlyDeviceName)
The friendly device name.
|
void |
setSession(java.lang.String session)
The session that should be passed both ways in challenge-response calls
to the service.
|
void |
setUserCode(java.lang.String userCode)
The one- time password computed using the secret code returned by AssociateSoftwareToken.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
VerifySoftwareTokenRequest |
withAccessToken(java.lang.String accessToken)
A valid access token that Amazon Cognito issued to the user whose
software token you want to verify.
|
VerifySoftwareTokenRequest |
withFriendlyDeviceName(java.lang.String friendlyDeviceName)
The friendly device name.
|
VerifySoftwareTokenRequest |
withSession(java.lang.String session)
The session that should be passed both ways in challenge-response calls
to the service.
|
VerifySoftwareTokenRequest |
withUserCode(java.lang.String userCode)
The one- time password computed using the secret code returned by AssociateSoftwareToken.
|
clone, copyBaseTo, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollectorpublic java.lang.String getAccessToken()
A valid access token that Amazon Cognito issued to the user whose software token you want to verify.
Constraints:
Pattern: [A-Za-z0-9-_=.]+
A valid access token that Amazon Cognito issued to the user whose software token you want to verify.
public void setAccessToken(java.lang.String accessToken)
A valid access token that Amazon Cognito issued to the user whose software token you want to verify.
Constraints:
Pattern: [A-Za-z0-9-_=.]+
accessToken - A valid access token that Amazon Cognito issued to the user whose software token you want to verify.
public VerifySoftwareTokenRequest withAccessToken(java.lang.String accessToken)
A valid access token that Amazon Cognito issued to the user whose software token you want to verify.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Pattern: [A-Za-z0-9-_=.]+
accessToken - A valid access token that Amazon Cognito issued to the user whose software token you want to verify.
public java.lang.String getSession()
The session that should be passed both ways in challenge-response calls to the service.
Constraints:
Length: 20 - 2048
The session that should be passed both ways in challenge-response calls to the service.
public void setSession(java.lang.String session)
The session that should be passed both ways in challenge-response calls to the service.
Constraints:
Length: 20 - 2048
session - The session that should be passed both ways in challenge-response calls to the service.
public VerifySoftwareTokenRequest withSession(java.lang.String session)
The session that should be passed both ways in challenge-response calls to the service.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 20 - 2048
session - The session that should be passed both ways in challenge-response calls to the service.
public java.lang.String getUserCode()
The one- time password computed using the secret code returned by AssociateSoftwareToken.
Constraints:
Length: 6 - 6
Pattern: [0-9]+
The one- time password computed using the secret code returned by AssociateSoftwareToken.
public void setUserCode(java.lang.String userCode)
The one- time password computed using the secret code returned by AssociateSoftwareToken.
Constraints:
Length: 6 - 6
Pattern: [0-9]+
userCode - The one- time password computed using the secret code returned by AssociateSoftwareToken.
public VerifySoftwareTokenRequest withUserCode(java.lang.String userCode)
The one- time password computed using the secret code returned by AssociateSoftwareToken.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 6 - 6
Pattern: [0-9]+
userCode - The one- time password computed using the secret code returned by AssociateSoftwareToken.
public java.lang.String getFriendlyDeviceName()
The friendly device name.
Constraints:
Length: 0 - 131072
The friendly device name.
public void setFriendlyDeviceName(java.lang.String friendlyDeviceName)
The friendly device name.
Constraints:
Length: 0 - 131072
friendlyDeviceName - The friendly device name.
public VerifySoftwareTokenRequest withFriendlyDeviceName(java.lang.String friendlyDeviceName)
The friendly device name.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 131072
friendlyDeviceName - The friendly device name.
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object