Versions Compared

Key

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

All our web services are authenticated using OAuth2 Bearer token authentication.

...

To authenticate with one of our services you will have to

...

create a bearer token through our identity server.

Table of Contents

Create bearer token

  1. POST to our token endpoint

    1. Set grant_type=client_credentials and scope=externalapi in the post body

    2. Set Content-Type

...

    1. =application/x-www-form-urlencoded

    2. Set Authorization header

      1. Header format is Basic Base64(Utf8(clientId:secret)) 

      2. Example: The header for clientId=

...

      1. democlient and secret=

...

      1. demosecret would become ZGVtb2NsaWVudDpkZW1vc2VjcmV0

      2. So the Authorize header for the Identity server should be:
        Basic ZGVtb2NsaWVudDpkZW1vc2VjcmV0

    1. Example return value:

...

    1. Code Block
      languagejson
      {
          "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciNlcyIsImV4cCI6MTQ2MzA",
          "expires_in": 3600,
          "token_type": "Bearer"
      }

Authentication

When calling one of our web services set the Authorize header to

...

Bearer [access_token]

Example: Bearer eyJ0eXAiOiJKV1QiLCJhbGciNlcyIsImV4cCI6MTQ2MzA

...

Endpoints

Use the following connection information when connecting to our environments.

Demo

Token endpoint: https://authstaging.pei.is/core/connect/token

clientId: democlient

secret: demosecret

Production

Token endpoint: https://auth.pei.is/core/connect/token

Info

Contact customer support for access to the production environment