Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
  • The token is valid for 30 minutes and

  • The token is returned in a json web structure with token as key https://jwt.io/ ) but and can be handled as a plain string on the client side.Only call this API once each validation period - do not authenticate every time you use the service

  • New token should be obtained after expiry by calling this endpoint again, not each time another endpoint/service is used

Environments / endpoints

TEST

Status
colourBlue
titlePOST

https://staging-ws.di.no/ws/json/auth/v-2/login

PRODUCTION

Status
colourBlue
titlePOST

https://ws.di.no/ws/json/auth/v-2/login

...

Making a request

Request headers

Key

Value

Content-Type

application/json

...

Field

Description

Example

Data typeCount

username

The username that was provided by the DI service desk

myName

String1

password

The password that was provided by the DI service desk

secret!23

String

1

Curl request example

Code Block
curl https://ws.di.no/ws/json/auth/v-2/login \
  -H "Content-Type:application/json" \
  -d "{\"username\": \"myname\", \"password\": \"secret\"}"

Response

...

The endpoint replies with a response object in JSON format, containing the following data

Field

Description

Example

Data type

Count

token

The JWT token to be used in subsequent requests

aVeryLongString

String1

The security token should be placed in the Authorization header like this:

...