openapi: 3.0.3
info:
title: Gencove Back array jwt API
version: v2
contact:
email: support@gencove.com
license:
name: Proprietary
description: API for Gencove REST service. Visit enterprise.gencove.com and docs.gencove.com for more information.
To work with Insomnia, you can generate a Gencove API key by clicking here. Once you have the API key and have imported the project in Insomnia as a Request Collection, enter the key in Insomnia under Manage Environment.
Run in Insomnia
servers:
- url: https://api.gencove.com
tags:
- name: jwt
paths:
/api/v2/jwt-create/:
post:
operationId: jwt_create_create
description: 'Takes a set of user credentials and returns an access and refresh JSON web
token pair to prove the authentication of those credentials.'
tags:
- jwt
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OTPTokenObtainPair'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/OTPTokenObtainPair'
multipart/form-data:
schema:
$ref: '#/components/schemas/OTPTokenObtainPair'
required: true
security:
- JWT: []
- API key: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TokenPair'
description: ''
/api/v2/jwt-logout/:
post:
operationId: jwt_logout_create
description: Logout user and blacklist current JWT refresh token.
tags:
- jwt
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BlacklistRefreshToken'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/BlacklistRefreshToken'
multipart/form-data:
schema:
$ref: '#/components/schemas/BlacklistRefreshToken'
required: true
security:
- JWT: []
- API key: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BlacklistRefreshToken'
description: ''
/api/v2/jwt-refresh/:
post:
operationId: jwt_refresh_create
description: 'Takes a refresh type JSON web token and returns an access type JSON web
token if the refresh token is valid.'
tags:
- jwt
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TokenRefresh'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/TokenRefresh'
multipart/form-data:
schema:
$ref: '#/components/schemas/TokenRefresh'
required: true
security:
- JWT: []
- API key: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TokenRefresh'
description: ''
/api/v2/jwt-verify/:
post:
operationId: jwt_verify_create
description: 'Takes a token and indicates if it is valid. This view provides no
information about a token''s fitness for a particular use.'
tags:
- jwt
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TokenVerify'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/TokenVerify'
multipart/form-data:
schema:
$ref: '#/components/schemas/TokenVerify'
required: true
security:
- JWT: []
- API key: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TokenVerify'
description: ''
components:
schemas:
TokenRefresh:
type: object
properties:
access:
type: string
readOnly: true
refresh:
type: string
writeOnly: true
required:
- access
- refresh
TokenPair:
type: object
properties:
refresh:
type: string
access:
type: string
required:
- access
- refresh
OTPTokenObtainPair:
type: object
description: Mixin to add token validation to serializers.
properties:
otp_token:
type: string
writeOnly: true
backup_token:
type: string
writeOnly: true
email:
type: string
writeOnly: true
password:
type: string
writeOnly: true
required:
- email
- password
TokenVerify:
type: object
properties:
token:
type: string
writeOnly: true
required:
- token
BlacklistRefreshToken:
type: object
description: Blacklist provided JWT refresh token.
properties:
refresh:
type: string
required:
- refresh
securitySchemes:
API key:
type: apiKey
description: 'Authorization header content formated as: `Api-Key `
You can obtain new API key through Gencove''s web UI or `user-api-key` endpoint'
in: header
name: Authorization
JWT:
type: apiKey
description: 'Authorization header content formated as: `Bearer `
You can obtain access token using `jwt-create` endpoint.'
in: header
name: Authorization