On same device

No user input is expected. Authentication is achieved through "app-switching".

Based on the Pointsharp Net iD Access server documentation found here:

Configuration

Authenticator type: NiasOnSameDevice

Common Authenticator configuration can be found here.

Name
Description
Default value
Mandatory

internal_http_destination

ID of the internal http client used to talk with backend.

N/A

backend_url

Url to the backend server.

N/A

webroot_dir

See common authenticator configuration

web/authenticator/nias/niasood

custom_identifier

When logging events, the custom_identifier lets you tag the event.

N/A

Logging

Apart from system logging, event logging is done when starting, completing, and failing a transaction.

Event ids are:

  • WEB_100009("NetID Access authentication started"),

    • IDENTIFIER (user trace id)

    • SOURCE_ADDRESS (ip address of device starting transaction)

    • CUSTOMER_IDENTIFIER (if configured)

  • WEB_100010("NetID Access authentication completed"),

    • IDENTIFIER (user trace id)

    • SOURCE_ADDRESS (ip address of the device used)

    • CUSTOMER_IDENTIFIER (if configured)

  • WEB_100011("NetID Access authentication failed"),

    • IDENTIFIER (user trace id)

    • SOURCE_ADDRESS (ip address of the device used)

    • CUSTOMER_IDENTIFIER (if configured)

    • MESSAGE (Detail from Net Id Access server)

  • WEB_100012("NetID Access authentication canceled or expired")

    • IDENTIFIER (user trace id)

    • SOURCE_ADDRESS (ip address of the device used)

    • CUSTOMER_IDENTIFIER (if configured)

    • MESSAGE (Detail from Net Id Access server)

Data exposed to global state

After a user completes a transaction, the authenticator is marked as done. Data from the authentication response is then put into the global state replacing old values:

  • givenName

  • surName

  • name

  • personalNumber

  • certificate

  • userID

  • deviceAddress

  • deviceName

  • deviceVersion

Note that it is not guaranteed that all parameters hold value. The result varies depending on the configuration.

API

When communicating with the backend this describes the

General requirements

Backend communications are made using AJAX and the HTTP PUT method. Every request need a Content-Type with the value of application/json.

Getting state

Body must conform to the example below.

Starting an authentication

To start authentication send AJAX request containing the user's identifier, 12 digits.

Cancel a request

A request can be canceled at any time. This is done by sending a cancel request.

Response from server

In general, you should expect a server response with http status code 200. Anything else is to be considered an error.

Response body will be in the form of a JSON object. Typically the response looks like:

The property "status" will contain status.

Possible status messages

One of the following status codes is returned based on the current state.

  • ABOUT_TO_START

  • PENDING

  • COMPLETED

  • FREJA_ERROR

  • ERROR

Possible niasStatus messages

One of the following niasStatus codes is returned based on the current state.

  • INVALID_PARAMETERS

  • ACCESS_DENIED_RP

  • SIGN_VALIDATION_FAILED

  • RETRY

  • USER_SIGN

  • COMPLETE

  • USER_BLOCKED

  • INTERNAL_ERROR

  • UNKNOWN_USER

  • ALREADY_COLLECTED

  • INVALID_DEVICESW

  • ALREADY_IN_PROGRESS

  • USER_CANCEL, CANCELLED,

  • EXPIRED_TRANSACTION

  • OUTSTANDING_TRANSACTION

  • PENDING

  • UNKNOWN

Data in authRef

Once the authentication process has started the identifier generated by the Nias-backed server is sent back to the client in parameter authRef.

Translation keys