RegisterResponseData

public class RegisterResponseData extends ResponseData

A utility class to produce a U2F RegisterResponse 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-registerresponse-members.

Inherited Constant Summary

Public Constructor Summary

RegisterResponseData(byte[] registerData)
Constructs a register response object with the given register response data.
RegisterResponseData(byte[] registerData, ProtocolVersion protocolVersion, String clientDataString)
Constructs a register response object with the given data.

Public Method Summary

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

Inherited Method Summary

Public Constructors

public RegisterResponseData (byte[] registerData)

Constructs a register response object with the given register response data. Implicitly, this response's protocol version is V1.

public RegisterResponseData (byte[] registerData, ProtocolVersion protocolVersion, String clientDataString)

Constructs a register response object with the given data.

Parameters
registerData The register response data.
protocolVersion The protocol version of the response. This MUST NOT be V1. For that version, use the other constructor.
clientDataString The string representation of the ClientData object for this enroll response.

Public Methods

public boolean equals (Object o)

public String getClientDataString ()

public ProtocolVersion getProtocolVersion ()

public byte[] getRegisterData ()

public int getVersionCode ()

public int hashCode ()

public JSONObject toJsonObject ()

public void writeToParcel (Parcel dest, int flags)