Package ch.nevis.mobile.sdk.api
package ch.nevis.mobile.sdk.api
Contains the
MobileAuthenticationClient
interface, which is the
entry point to the SDK.
Your application should generally create an application scoped SDK instance, by passing in a
Configuration
that specifies the SDK behavior. The configuration
defines the URLs used to perform operations with a NEVIS Mobile Authentication backend.
To create the SDK, assuming that the Configuration
has already
been created (see Configuration.Builder
,
here is an example to setup the SDK during application startup:
import android.content.Context; [...] public static void createMobileAuthenticationClient(Context context, Configuration configuration) { return MobileAuthenticationClientInitializer.initializer() .context(context) .configuration(configuration) .onError(error -> { // handle error }) .onSuccess(mobileAuthenticationClient -> { // handle the MobileAuthenticationClient }) .execute(); } }
Authentication example:
private void authenticateUsingOutOfBandPayload(MobileClientAuthentication client, OutOfBandPayload payload) { Operations operations = client.operations(); operations.outOfBandOperation() .payload(payload) .onAuthentication(authentication -> authentication.authenticatorSelector((ctx, consumer) -> { // select authenticator }) .pinUserVerifier(pinUserVerifier) .fingerprintUserVerifier(fingerprintUserVerifier) .biometricUserVerifier(biometricUserVerifier) .onError(error -> { // handle error }) .onSuccess(sessionProvider -> { // handle success }) .execute()) .onRegistration(registration -> { // handle registration }) .onError(error -> { // handle out-of-band error }) .execute(); }
-
ClassDescriptionThe
MobileAuthenticationClient
configuration.A simplified builder that can be used to configure an SDK when your application works with the Nevis Authentication Cloud.A builder forConfiguration
.Collection ofMobileAuthenticationClient
initialization error codes.An error that indicates that some form of tampering was found in the application.Secure hardware is not available on this device or an error occurred checking the hardware of the device.User has changed the lock screen configuration of the device and the credentials were created using an SDK previous to 1.7.The android device has no secure lock screen.The device is rooted.TheMobileAuthenticationClient
interface represents the entry point to the SDK.The parent of all the errors that can be returned.The class that creates and initializes asynchronously an instance ofMobileAuthenticationClient
.