public final class FingerprintChallenge extends android.hardware.fingerprint.FingerprintManager.AuthenticationCallback implements IChallenge
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<FingerprintChallenge> |
CREATOR
Creates an instance from a parcel.
|
Constructor and Description |
---|
FingerprintChallenge()
Returns an instance containing a new
IChallenge . |
FingerprintChallenge(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.util.HashMap<java.lang.String,java.lang.Object> |
getChallengeData()
Returns the challengeData of the mechanism.
|
java.lang.String |
getChallengeText()
Returns the text representing the server challenge which requires signing.
|
java.lang.String |
getDescription()
Returns the description of the mechanism.
|
java.lang.String |
getIdentifier()
Returns the identifier of the mechanism.
|
java.lang.String[] |
getKeyHandles()
Returns an array of
String representing names of key handles. |
java.lang.String |
getKeyName()
Returns the type's identifier, used to access the private key in the key store.
|
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.
|
java.lang.String |
getType()
Returns the type of enrollment challenge.
|
void |
launchUI(android.app.Activity activity,
IChallengeCallbackHandleUserInput callback)
Launches the Fingerprint dialog for LocalAuthentication.
|
void |
onAuthenticationSucceeded(android.hardware.fingerprint.FingerprintManager.AuthenticationResult result)
Signs the challengeText when the user has successfully authenticated with its fingerprint.
|
IChallenge |
parse(org.json.JSONObject data)
Returns an instance of
IChallenge parsed from the object, or null if data
cannot be parsed. |
void |
setChallengeData(java.util.HashMap<java.lang.String,java.lang.Object> challengeData)
Set the challengeData of the mechanism.
|
void |
setKeyName(java.lang.String keyName)
Set the type's identifier, used to access the private key in the key store.
|
void |
setPostbackUri(java.lang.String postbackUri)
Set the postback URL 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<FingerprintChallenge> CREATOR
public FingerprintChallenge()
IChallenge
.public FingerprintChallenge(java.lang.String messagePrompt)
IChallenge
with a message.messagePrompt
- the message to display.java.lang.IllegalArgumentException
- if parameter is nullpublic 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 writtenpublic int describeContents()
describeContents
in interface android.os.Parcelable
public java.lang.String getName()
public java.util.HashMap<java.lang.String,java.lang.Object> getChallengeData()
public void setChallengeData(java.util.HashMap<java.lang.String,java.lang.Object> challengeData)
challengeData
- the data to be setjava.lang.IllegalArgumentException
- if parameter is nullpublic void setPostbackUri(java.lang.String postbackUri)
setPostbackUri
in interface IChallenge
postbackUri
- the postback URL to be setjava.lang.IllegalArgumentException
- if parameter is nullpublic java.lang.String getType()
public 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 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, or null if data
cannot be parsed.parse
in interface IChallenge
data
- the object to deserialize from.FingerprintChallenge
or null if data cannot be parsedpublic java.lang.String getChallengeText()
public java.lang.String getKeyName()
public void setKeyName(java.lang.String keyName)
keyName
- the name of the key in the key storejava.lang.IllegalArgumentException
- if parameter is nullpublic java.lang.String[] getKeyHandles()
String
representing names of key handles.String
representing names of key handles.public void launchUI(android.app.Activity activity, IChallengeCallbackHandleUserInput callback)
launchUI
in interface IChallenge
callback
- The function delegate that is invoked with the ChallengeResult
java.lang.IllegalArgumentException
- if any parameter is nulljava.lang.UnsupportedOperationException
- if Android API level is < 23java.lang.UnsupportedOperationException
- if no Fingerprint hardware is detectedpublic void onAuthenticationSucceeded(android.hardware.fingerprint.FingerprintManager.AuthenticationResult result)
onAuthenticationSucceeded
in class android.hardware.fingerprint.FingerprintManager.AuthenticationCallback
result
- the FingerprintManager.AuthenticationResult
object from the FingerprintManager