REST API  5.0.0
REST API for SafeNet Network HSMs
POST /auth/jwt

POST /auth/jwt

Create a JWT access token and yield its compact serialization, which can be used in Authorization headers to access resources.

Parameters

expiresIn

The expiry time of the JWT, specified in seconds from the current time. If none is specified, the default expiration time of 10 minutes will be used.

Use: Optional

JSON Schema:

   Object
   type: integer

Responses

200

Success

400

Unexpected error

Example Request

   POST
   https://1.2.3.4:8443/auth/jwt
   Authorization: Basic YWRtaW46MXFAVzNlJFI=
   { "expiresIn": 300 }

Example Result

   { "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0ODg1NjI0MzcsImp0aSI6IjMvTEZURnFwRXhrd01palVUaE5BR3Mvclo4QVZKZUpZRVdRWUxnbndjNUU9IiwidXNlciI6ImFkbWluIn0.R8vFBavGWcqAPBFVXofXq8mKrsy8E2wUJX6n8p1KLbs" }