Introduction

The biid Security Provider SDK is the easiest way to integrate authentication by the biid Security Provider in an app. The biid Security Provider SDK library contains a biid Security Provider Client. This client communicates with the biid Security Provider Service.

The developers guide describes how to integrate the biid Security Provider SDK library and use the biid Security Provider Client. For further details please check the javadoc.

Integration

Include the biid Security Provider SDK library as a dependency in your Android project:

repositories {

    ...

    maven {
        url "http://nexus.biid.com/content/repositories/client-releases"
    }

    ...
}

dependencies {

    ...

    compile ('com.biid:sdk-secprov-android:3.1.59'){transitive=true}

    ...
}

Manifest

biid will provide you with a manifest file. Place this file in the assets directory of your Android project.

Initialization

Get a reference to the biid Security Provider Client like this:

SecurityProviderClient client = Sdk.getClient();

The first call to the client must be

client.initialize(context, installationId);

Verification

Before a user can be registered, their phone number must be verified. Request a verification code with:

client.requestPhoneNumberVerification(phoneNumber);

The verification code is send over an alternative channel. When received, verify the phoneNumber like this:

client.verifyPhoneNumber(phoneNumber, code);

Registration

To register a user in the Security Provider, pass in the user details:

client.register(username, passcode, phoneNumber);

Login

The user can login to the Security Provider with a username and passcode

client.login(username, passcode);

or, if enabled, with their fingerprint

client.loginWithFingerprintAuthentication(context, callback, handler, cancellationSignal);

While logged in, use this access token to authenticate to the biid Identity Service:

client.getAccessToken()

Logout

Logout of the Security Provider as follows:

client.logout()