public class HotpChallenge extends java.lang.Object implements IChallenge
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<HotpChallenge> |
CREATOR
Creates an instance from a parcel.
|
Constructor and Description |
---|
HotpChallenge()
Returns an instance containing a new
IChallenge . |
HotpChallenge(java.lang.String messagePrompt)
Returns an instance containing a new
IChallenge with a message. |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Returns a bitmask indicating the set of special object types marshaled by this Parcelable
object instance.
|
java.lang.String |
getDescription()
Returns the description of the mechanism.
|
java.lang.String |
getIdentifier()
Returns the identifier of the mechanism.
|
java.lang.String |
getMessagePrompt()
Returns the message to display in the alert when prompted.
|
java.lang.String |
getName()
Returns the name of the mechanism.
|
java.lang.String |
getPostbackUri()
Returns the postback URI of the mechanism.
|
java.lang.String |
getState()
Returns the unique identifier of the mechanism request.
|
void |
launchUI(android.app.Activity activity,
IChallengeCallbackHandleUserInput callback)
This method launches an
AlertDialog to prompt for a HMAC based one-time password. |
IChallenge |
parse(org.json.JSONObject data)
Returns an instance of
IChallenge parsed from the object. |
void |
setPostbackUri(java.lang.String postbackUri)
The postback URI of the mechanism.
|
void |
setState(java.lang.String state)
Set the unique identifier of the mechanism request.
|
void |
writeToParcel(android.os.Parcel parcel,
int i)
Writes the object into a parcel.
|
public static final android.os.Parcelable.Creator<HotpChallenge> CREATOR
public HotpChallenge()
IChallenge
.public HotpChallenge(java.lang.String messagePrompt)
IChallenge
with a message.messagePrompt
- the message to displayjava.lang.IllegalArgumentException
- if parameter is nullpublic java.lang.String getName()
public java.lang.String getIdentifier()
urn:ibm:security:authentication:asf:mechanism:hotp
getIdentifier
in interface IChallenge
public java.lang.String getDescription()
getDescription
in interface IChallenge
public IChallenge parse(org.json.JSONObject data)
IChallenge
parsed from the object.parse
in interface IChallenge
data
- the object to deserialize fromIChallenge
, or null if data cannot be parsed.public void setPostbackUri(java.lang.String postbackUri)
setPostbackUri
in interface IChallenge
postbackUri
- the postback URI of the mechanismjava.lang.IllegalArgumentException
- if parameter is nullpublic java.lang.String getPostbackUri()
getPostbackUri
in interface IChallenge
public java.lang.String getState()
getState
in interface IChallenge
public void setState(java.lang.String state)
setState
in interface IChallenge
state
- unique identifier to be setjava.lang.IllegalArgumentException
- if parameter is nullpublic java.lang.String getMessagePrompt()
getMessagePrompt
in interface IChallenge
public void launchUI(android.app.Activity activity, IChallengeCallbackHandleUserInput callback)
AlertDialog
to prompt for a HMAC based one-time password.launchUI
in interface IChallenge
callback
- the function delegate that is invoked with the user inputpublic int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel parcel, int i)
writeToParcel
in interface android.os.Parcelable
parcel
- the parcel where the object is written intoi
- flags about how the object should be written