Requesting a credential
The service authentication certificate is required for secure API calls to the RapID Service when requesting credentials for your app users.
Now that you have installed your service authentication certificate, you have two options of how to request a credential. You can either access our webservice endpoint directly, or to make life simpler we have developed RapID Server SDKs for C#, PHP and Ruby. The sample code below makes use of the appropriate SDK. The purpose here is to provide a registration URL which your app will use to register the device it's installed on.
The basic steps of registration are:
- Verify the user details however you want.
- Create an anonymous identifier.
- Persist the anonymous identifier in your existing user database and map this to the user account.
- Use an SDK or access the web service directly:
- Instantiate the RapID Server SDK, providing credentials as required by the language SDK.
- Call the RapID Server SDK method
request_identity(Ruby) providing anonymous identifier to get the
- Setup a connection using the certificate you have been provided at registration for authentication.
- Post the correct Json structure with the
anonymousIdto get the
RequestIdto the device.
The anonymous ID that you create will be stored in the credential that is deployed to your end-user's device. It must be no longer than 64 characters and should be taken from the following set of characters: a-z, A-Z, 0-9, underscore ("_") or hyphen ("-"). You should also not include any personally identifiable information of your customer in the anonymous identifier.
Note: It is recommended that all anonymous identifiers are unique such that they identify the end-user’s device to which the credential will be deployed.
If you do not do this, then you must store the resultant
RequestId as this will be the only way you can identify a credential should you have a need
to prevent it being renewed or to request a replacement.
In the related samples, we are using a text representation of a GUID, which will be of the
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx where the
x characters are replaced by hex digits (0-9, a-f). This complies with the rules above.