QwykInvenio Authentication API (1.0)

Download OpenAPI specification:Download

About

The Authentication API is an HTTP API served by the Invenio gateway providing endpoints to generate and refresh JSON Web Tokens, which are the main authentication mechanism across other Invenio APIs.

Versioning

This documentation is for version 1.0 of the API. Use this table to find documentation for previous versions of the API:

API Version Changes
Latest None
1.0 None

jwt

Obtain and refresh JSON Web Tokens

Obtain a JSON Web Token

API View that receives a POST with a user's username and password. Returns a JSON Web Token that can be used for authenticated requests.

Request Body schema: application/json
username
required
string
password
required
string <password>

Responses

200

OK

400

BAD REQUEST: Unable to log in with provided credentials.

401

Permissions not assigned to user

post /api-token-auth
Production server
https://gateway.invenio.qwyk.io/jwt/api-token-auth

Request samples

application/json
Copy
Expand all Collapse all
{
  • "username": "client_test",
  • "password": "DeokhDLx77bGgeZxRvxf"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VybmFtZSI6InRlc3QiLCJleHAiOjE1MjUxNjczNTcsImVtYWlsIjoiIiwib3JpZ19pYXQiOjE1MjUxNjM1NTF9.QWnQ3xRss7mCzbgLNczo7dfpJmPRTPVsN_JOO2fX0CY",
  • "expiry": "2018-05-01T09:36:27+00:00"
}

Refresh a JSON Web Token

API View that returns a refreshed token (with new expiration) based on existing token

Request Body schema: application/json
token
required
string <byte>

Your current, valid and non-expired, token

Responses

200

OK

400

Bad Request

401

Signature Expired

post /api-token-refresh
Production server
https://gateway.invenio.qwyk.io/jwt/api-token-refresh

Request samples

application/json
Copy
Expand all Collapse all
{
  • "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VybmFtZSI6InRlc3QiLCJleHAiOjE1MjUxNjczNTcsImVtYWlsIjoiIiwib3JpZ19pYXQiOjE1MjUxNjM1NTF9.QWnQ3xRss7mCzbgLNczo7dfpJmPRTPVsN_JOO2fX0CY"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VybmFtZSI6InRlc3QiLCJleHAiOjE1MjUxNjczNTcsImVtYWlsIjoiIiwib3JpZ19pYXQiOjE1MjUxNjM1NTF9.QWnQ3xRss7mCzbgLNczo7dfpJmPRTPVsN_JOO2fX0CY",
  • "expiry": "2018-05-01T09:36:27+00:00"
}