Class WebAuthnRegistrationCallback
- java.lang.Object
-
- org.forgerock.android.auth.callback.AbstractCallback
-
- org.forgerock.android.auth.callback.MetadataCallback
-
- org.forgerock.android.auth.callback.WebAuthnRegistrationCallback
-
- All Implemented Interfaces:
java.io.Serializable,Callback,DerivableCallback,WebAuthnCallback
public class WebAuthnRegistrationCallback extends MetadataCallback implements WebAuthnCallback
A callback that allows some extra metadata to be sent in the response.When serialized as JSON in an authenticate response, the
MetadataCallback.getValue()object will be the value of a single data output value, so for a value of{ "foo": "bar" }, this would be output as:{@code { "authId": "...", "callbacks": [ // ... { "type": "MetadataCallback", "output": [ { "name": "data", "value": { "_action": "webauthn_registration", "challenge": "vlJwjd3nd76zjNfav2km/FKOgcIRa4BNHdVyasnPSb4=", "attestationPreference": "none", "userName": "e24f0d7c-a9d5-4a3f-a002-6f808210a8a3", "userId": "ZTI0ZjBkN2MtYTlkNS00YTNmLWEwMDItNmY4MDgyMTBhOGEz", "relyingPartyName": "ForgeRock", "authenticatorSelection": "{\"userVerification\":\"preferred\",\"authenticatorAttachment\":\"platform\"}", "_authenticatorSelection": { "userVerification": "preferred", "authenticatorAttachment": "platform" }, "pubKeyCredParams": "[ { \"type\": \"public-key\", \"alg\": -7 }, { \"type\": \"public-key\", \"alg\": -257 } ]", "_pubKeyCredParams": [ { "type": "public-key", "alg": -7 }, { "type": "public-key", "alg": -257 } ], "timeout": "60000", "excludeCredentials": "", "_excludeCredentials": [], "displayName": "e24f0d7c-a9d5-4a3f-a002-6f808210a8a3", "relyingPartyId": "id: \"openam.example.com\",", "_relyingPartyId": "openam.example.com", "_type": "WebAuthn" } } ] } ] }- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.forgerock.android.auth.callback.AbstractCallback
_id, content, VALUE
-
-
Constructor Summary
Constructors Constructor Description WebAuthnRegistrationCallback()WebAuthnRegistrationCallback(org.json.JSONObject jsonObject, int index)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetType()Return the type of the Callback, the type name should align with the Callback type returned from AMprotected WebAuthnRegistrationgetWebAuthnRegistration()static booleaninstanceOf(org.json.JSONObject value)Check if this callback isWebAuthnRegistrationCallbackTypevoidregister(androidx.fragment.app.Fragment fragment, Node node, FRListener<java.lang.Void> listener)Perform WebAuthn Registration.voidregister(Node node, FRListener<java.lang.Void> listener)Perform WebAuthn Registration with the current Activity, the Activity has to be of typeFragmentActivity-
Methods inherited from class org.forgerock.android.auth.callback.MetadataCallback
getDerivedCallback, getValue, setAttribute
-
Methods inherited from class org.forgerock.android.auth.callback.AbstractCallback
get_id, getContent, getContentAsJson, getInputValue, getInputValue, getName, setContent, setValue, setValue
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.forgerock.android.auth.callback.WebAuthnCallback
setHiddenCallbackValue
-
-
-
-
Method Detail
-
instanceOf
public static boolean instanceOf(org.json.JSONObject value)
Check if this callback isWebAuthnRegistrationCallbackType- Parameters:
value- The callback raw data json.- Returns:
- True if this is a
WebAuthnRegistrationCallbackType, else false
-
getType
public java.lang.String getType()
Description copied from interface:CallbackReturn the type of the Callback, the type name should align with the Callback type returned from AM- Specified by:
getTypein interfaceCallback- Overrides:
getTypein classMetadataCallback
-
register
public void register(@NonNull androidx.fragment.app.Fragment fragment, Node node, FRListener<java.lang.Void> listener)Perform WebAuthn Registration.- Parameters:
fragment- The currentFragmentthat handle this callbacknode- The Node returned from AMlistener- Listener to listen for WebAuthn Registration Event
-
register
public void register(Node node, FRListener<java.lang.Void> listener)
Perform WebAuthn Registration with the current Activity, the Activity has to be of typeFragmentActivity- Parameters:
node- The Node returned from AMlistener- Listener to listen for WebAuthn Registration Event
-
getWebAuthnRegistration
protected WebAuthnRegistration getWebAuthnRegistration() throws org.json.JSONException
- Throws:
org.json.JSONException
-
-