Class WebAuthn
- java.lang.Object
-
- org.forgerock.android.auth.webauthn.WebAuthn
-
- Direct Known Subclasses:
WebAuthnAuthentication,WebAuthnRegistration
public abstract class WebAuthn extends java.lang.ObjectAbstract class to provide common utilities method forWebAuthnAuthenticationandWebAuthnRegistration
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String_ACTIONstatic java.lang.String_ALLOW_CREDENTIALSstatic java.lang.String_AUTHENTICATOR_SELECTIONstatic java.lang.String_EXCLUDE_CREDENTIALSstatic java.lang.String_PUB_KEY_CRED_PARAMSstatic java.lang.String_TYPEstatic java.lang.StringALGstatic java.lang.StringALLOW_CREDENTIALSstatic java.lang.StringATTESTATION_PREFERENCEstatic java.lang.StringAUTHENTICATOR_ATTACHMENTstatic java.lang.StringAUTHENTICATOR_SELECTIONstatic java.lang.StringCHALLENGEstatic java.lang.StringDISPLAY_NAMEstatic java.lang.StringEXCLUDE_CREDENTIALSstatic java.lang.StringPUB_KEY_CRED_PARAMSstatic java.lang.StringRELYING_PARTY_NAMEstatic java.lang.StringREQUIRE_RESIDENT_KEYstatic java.lang.StringREQUIREDstatic java.lang.StringTIMEOUTstatic java.lang.StringTIMEOUT_DEFAULTstatic java.lang.StringTYPEstatic java.lang.StringUSER_IDstatic java.lang.StringUSER_NAMEstatic java.lang.StringUSER_VERIFICATIONstatic java.lang.StringWEB_AUTHNstatic java.lang.StringWEBAUTHN_AUTHENTICATIONstatic java.lang.StringWEBAUTHN_REGISTRATION
-
Constructor Summary
Constructors Constructor Description WebAuthn()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<com.google.android.gms.fido.fido2.api.common.PublicKeyCredentialDescriptor>getCredentials(org.json.JSONArray credentials)Parse thePublicKeyCredentialDescriptorprotected java.lang.StringgetRelyingPartyId(org.json.JSONObject value)Parse the relaying party id.protected voidonWebAuthnException(WebAuthnListener listener, java.lang.Exception e)Transform the exception and invokeWebAuthnListener.onException(WebAuthnResponseException)orWebAuthnListener.onUnsupported(WebAuthnResponseException)
-
-
-
Field Detail
-
_ACTION
public static final java.lang.String _ACTION
- See Also:
- Constant Field Values
-
CHALLENGE
public static final java.lang.String CHALLENGE
- See Also:
- Constant Field Values
-
TIMEOUT
public static final java.lang.String TIMEOUT
- See Also:
- Constant Field Values
-
_ALLOW_CREDENTIALS
public static final java.lang.String _ALLOW_CREDENTIALS
- See Also:
- Constant Field Values
-
ALLOW_CREDENTIALS
public static final java.lang.String ALLOW_CREDENTIALS
- See Also:
- Constant Field Values
-
USER_VERIFICATION
public static final java.lang.String USER_VERIFICATION
- See Also:
- Constant Field Values
-
ATTESTATION_PREFERENCE
public static final java.lang.String ATTESTATION_PREFERENCE
- See Also:
- Constant Field Values
-
USER_NAME
public static final java.lang.String USER_NAME
- See Also:
- Constant Field Values
-
USER_ID
public static final java.lang.String USER_ID
- See Also:
- Constant Field Values
-
RELYING_PARTY_NAME
public static final java.lang.String RELYING_PARTY_NAME
- See Also:
- Constant Field Values
-
DISPLAY_NAME
public static final java.lang.String DISPLAY_NAME
- See Also:
- Constant Field Values
-
_PUB_KEY_CRED_PARAMS
public static final java.lang.String _PUB_KEY_CRED_PARAMS
- See Also:
- Constant Field Values
-
PUB_KEY_CRED_PARAMS
public static final java.lang.String PUB_KEY_CRED_PARAMS
- See Also:
- Constant Field Values
-
TYPE
public static final java.lang.String TYPE
- See Also:
- Constant Field Values
-
ALG
public static final java.lang.String ALG
- See Also:
- Constant Field Values
-
_AUTHENTICATOR_SELECTION
public static final java.lang.String _AUTHENTICATOR_SELECTION
- See Also:
- Constant Field Values
-
AUTHENTICATOR_SELECTION
public static final java.lang.String AUTHENTICATOR_SELECTION
- See Also:
- Constant Field Values
-
REQUIRED
public static final java.lang.String REQUIRED
- See Also:
- Constant Field Values
-
REQUIRE_RESIDENT_KEY
public static final java.lang.String REQUIRE_RESIDENT_KEY
- See Also:
- Constant Field Values
-
AUTHENTICATOR_ATTACHMENT
public static final java.lang.String AUTHENTICATOR_ATTACHMENT
- See Also:
- Constant Field Values
-
_EXCLUDE_CREDENTIALS
public static final java.lang.String _EXCLUDE_CREDENTIALS
- See Also:
- Constant Field Values
-
EXCLUDE_CREDENTIALS
public static final java.lang.String EXCLUDE_CREDENTIALS
- See Also:
- Constant Field Values
-
TIMEOUT_DEFAULT
public static final java.lang.String TIMEOUT_DEFAULT
- See Also:
- Constant Field Values
-
WEB_AUTHN
public static final java.lang.String WEB_AUTHN
- See Also:
- Constant Field Values
-
WEBAUTHN_REGISTRATION
public static final java.lang.String WEBAUTHN_REGISTRATION
- See Also:
- Constant Field Values
-
WEBAUTHN_AUTHENTICATION
public static final java.lang.String WEBAUTHN_AUTHENTICATION
- See Also:
- Constant Field Values
-
_TYPE
public static final java.lang.String _TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getRelyingPartyId
protected java.lang.String getRelyingPartyId(org.json.JSONObject value) throws org.json.JSONExceptionParse the relaying party id.- Parameters:
value- The json value to parse- Returns:
- The relaying party id.
- Throws:
org.json.JSONException- Failed to parse the json input.
-
getCredentials
protected java.util.List<com.google.android.gms.fido.fido2.api.common.PublicKeyCredentialDescriptor> getCredentials(org.json.JSONArray credentials) throws org.json.JSONExceptionParse thePublicKeyCredentialDescriptor- Parameters:
credentials- The json array value to parse.- Returns:
- The list of
PublicKeyCredentialDescriptor - Throws:
org.json.JSONException- Failed to parse the json input.
-
onWebAuthnException
protected void onWebAuthnException(WebAuthnListener listener, java.lang.Exception e)
Transform the exception and invokeWebAuthnListener.onException(WebAuthnResponseException)orWebAuthnListener.onUnsupported(WebAuthnResponseException)- Parameters:
listener- Listener to listen for exception event.e- The exception
-
-