NEXT Identity API Technical Documentation

The Common Identity API helps authenticate against private resources or sign documents digitally.

Base URL

https://prod-common-identity-api.azurewebsites.net/

Connect thru .NET SDK (optional)

If you have a .NET application for your business, you can leverage the SDK experience using the nuget command below. SDK will handle the Identity API Authentication part out of the box.

Install-Package LinkMobility.IdentityApi.Client -version 1.0.4 -Source https://www.myget.org/F/linknorway/api/v3/index.json

This feed is not public, hence you would need to configure your nuget.config page as described here.

Identity API Authentication

In order to authenticate against Identity API you will need Basic Authentication.

The credentials you will need are the same as you have to provide for Next Portal.

Basic authentication is a very simple authentication scheme that is built into the HTTP protocol. The client sends HTTP requests with the Authorization header that contains the Basic word followed by a space and a base64-encoded username:password string. For example, a header containing the demo / p@55w0rd credentials would be encoded as:

Authorization: Basic ZGVtbzpwQDU1dzByZA==

Supported workflows

1. Authentication

Workflow Diagram

 

API Endpoints

1. [POST] /api/authentications (PostAuthenticationAsync)

Creates a new authentication. (Step 2)

If succeeds, returns authenticationId as a GUID in the location header. (Step 3)

Payload parameter name

Description

Payload parameter name

Description

partnerId

Desired NEXT PartnerId

method

Authentication method to use:

nbid, nbid-mobil Norwegian BankID / Mobile

sbid, sbid-mobil Swedish BankID / Mobile

identity

Identity (personal number / social security number) to verify against

callbackUrl

Your url that user will be redirected back to. (Step 8)

AuthenticationId value will be appended as a query string parameter with id name when Identity API calls you back.

customProperties

An optional <string, string> Dictionary that your custom properties are stored on the authentication.

2. [GET] /bankid/{partnerId}/{authenticationId}/authenticate (GetBankIdAuthenticationUrlAsync)

End user should be opening this page upon a new authentication is created and authenticationId is claimed. (Step 4)

Upon opening this page, end user will be redirected to the corresponding service provider’s authentication page. (Step 5)

Route parameter name

Description

Route parameter name

Description

authenticationId

Location header value claimed after succesful [POST] /api/authentications request

partnerId

Desired NEXT PartnerId

3. [GET] /api/authentications/{partnerId}/{authenticationId} (GetAuthenticationAsync)

It could be called anytime once an authentication is created. The best case for your business to call this endpoint would be the place where you verify whether the user authentication is complete or not. You can easily understand it by checking the success response property value. true means the authentication workflow is completed successfully. (Step 9) (Step 9)

Route parameter name

Description

Route parameter name

Description

authenticationId

Location header value claimed after succesful [POST] /api/authentications request

partnerId

Desired NEXT PartnerId

2. Signing

Workflow Diagram

API Endpoints

1. [POST] /api/signing (PostSigningAsync)

Creates a new signing. (Step 2)

If succeeds, returns signingId as a GUID in the location header. (Step 3)

Payload parameter name

Description

Payload parameter name

Description

partnerId

Desired NEXT PartnerId

method

Signing method to use:

nbid, nbid-mobil Norwegian BankID / Mobile

sbid, sbid-mobil Swedish BankID / Mobile

content

Base64 encoded string content to be signed

contentType

application/pdf or text/plain

nationalId

National Id for user allowed to sign (social security number). Leave empty if any user can sign.

phone

Phone number for user allowed to sign. Leave empty if any user can sign.

callbackUrl

Your url that user will be redirected back to. (Step 8)

SigningId value will be appended as a query string parameter with id name when Identity API calls you back.

2. [GET] /bankid/{partnerId}/{signingId}/sign (GetBankIdSigningUrlAsync)

End user should be opening this page upon a new signing is created and signingId is claimed. (Step 4)

Upon opening this page, end user will be redirected to the corresponding service provider’s signing page. (Step 5)

3. [GET] /api/signing/{partnerId}/{signingId} (GetSigningAsync)

It could be called anytime once a signing is created. The best case for your business to call this endpoint would be the place where you verify whether the user signing is complete or not. You can easily understand it by checking the success response property value. true means the signing worflow is completed successfully. (Step 9)

4. [GET] /api/signing/{partnerId}/document/{documentId} (GetDocumentAsync)

Optionally you may want to see the content for the document as Base64 encoded string. The documentId route parameter can be found in the response of [GET] /api/signing/{partnerId}/{signingId} method.

Swagger Documentations

Below you will find ready-to-use Swagger collection files for those 7 endpoints above grouped by workflow.

 

 

Feeling lost? Click on this link! Portal page