SignResponseData

public class SignResponseData extends ResponseData

A utility class to produce a U2F SignResponse object.

Example of handling response data:


 @Override
 protected void onActivityResult(int requestCode, int resultCode, Intent data) {
   if (resultCode != RESULT_OK) {
     // Something went wrong
   }

   switch(requestCode) {
     case REGISTER_REQUEST_CODE:
       RegisterResponseData registerResponse = (RegisterResponseData) data
           .getParcelableExtra(Fido.KEY_RESPONSE_EXTRA);
       // Do something useful
       break;
     case SIGN_REQUEST_CODE:
       SignResponseData signResponse = (SignResponseData) data
           .getParcelableExtra(Fido.KEY_RESPONSE_EXTRA);
       // Do something useful
       break;
     default:
       // Something went wrong
   }
 }
 

See //fidoalliance.org/specs/fido-u2f-v1.0-nfc-bt-amendment-20150514/fido-u2f-javascript-api.html#dictionary-signresponse-members.

Constant Summary

String JSON_RESPONSE_DATA_CLIENT_DATA
String JSON_RESPONSE_DATA_KEY_HANDLE
String JSON_RESPONSE_DATA_SIGNATURE_DATA

Inherited Constant Summary

Public Constructor Summary

SignResponseData(byte[] keyHandle, String clientDataString, byte[] signatureData)

Public Method Summary

boolean
String
byte[]
byte[]
int
JSONObject
void
writeToParcel(Parcel dest, int flags)

Inherited Method Summary

Constants

public static final String JSON_RESPONSE_DATA_CLIENT_DATA

Constant Value: "clientData"

public static final String JSON_RESPONSE_DATA_KEY_HANDLE

Constant Value: "keyHandle"

public static final String JSON_RESPONSE_DATA_SIGNATURE_DATA

Constant Value: "signatureData"

Public Constructors

public SignResponseData (byte[] keyHandle, String clientDataString, byte[] signatureData)

Public Methods

public boolean equals (Object o)

public String getClientDataString ()

public byte[] getKeyHandle ()

public byte[] getSignatureData ()

public int hashCode ()

public JSONObject toJsonObject ()

public void writeToParcel (Parcel dest, int flags)