added endpoints for the token vault
This commit is contained in:
parent
ebee1178ef
commit
937a0323ed
@ -9,6 +9,83 @@ servers:
|
|||||||
tags:
|
tags:
|
||||||
- name: tokens
|
- name: tokens
|
||||||
paths:
|
paths:
|
||||||
|
/tokens:
|
||||||
|
parameters:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- tokens
|
||||||
|
summary: Create a new token entry in the vault
|
||||||
|
description: Create a new token entry in the vault, if the customerProfileId has been supplied create in the customerToken DB otherwise in the AnonymousToken DB
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/CreateTokenBody"
|
||||||
|
examples:
|
||||||
|
token:
|
||||||
|
value:
|
||||||
|
{
|
||||||
|
"xTAT": "cf694905-7f76-4799-b0bc-490716921323",
|
||||||
|
"otpKey": "123456789123456789123456789abcde"
|
||||||
|
}
|
||||||
|
responses:
|
||||||
|
"201":
|
||||||
|
description: Created
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/unavailable"
|
||||||
|
example:
|
||||||
|
"Ok"
|
||||||
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/ErrorResponse"
|
||||||
|
examples:
|
||||||
|
Missing Parameters:
|
||||||
|
value:
|
||||||
|
status: 400
|
||||||
|
title: Missing Mandatory Parameter
|
||||||
|
detail: Required parameter {0} is missing.
|
||||||
|
Invalid Parameters:
|
||||||
|
value:
|
||||||
|
status: 400
|
||||||
|
title: Invalid Parameter
|
||||||
|
detail: Required parameter {0} is invalid.
|
||||||
|
"401":
|
||||||
|
description: Unauthorized
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/ErrorResponse"
|
||||||
|
examples:
|
||||||
|
Unauthorized:
|
||||||
|
value:
|
||||||
|
status: 401
|
||||||
|
title: Unauthorized
|
||||||
|
detail: Invalid Access Token
|
||||||
|
"404":
|
||||||
|
description: Not found
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/ErrorResponse"
|
||||||
|
examples:
|
||||||
|
TAT not found:
|
||||||
|
value:
|
||||||
|
status: 404
|
||||||
|
title: Not Found
|
||||||
|
detail: TAT Account Not Found
|
||||||
|
"500":
|
||||||
|
description: Internal server error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/ErrorResponse"
|
||||||
|
example:
|
||||||
|
error: An unknown error has occurred
|
||||||
/tokens/{xtat}/status:
|
/tokens/{xtat}/status:
|
||||||
parameters:
|
parameters:
|
||||||
- name: xtat
|
- name: xtat
|
||||||
@ -108,35 +185,66 @@ paths:
|
|||||||
$ref: "#/components/schemas/ErrorResponse"
|
$ref: "#/components/schemas/ErrorResponse"
|
||||||
example:
|
example:
|
||||||
error: An unknown error has occurred
|
error: An unknown error has occurred
|
||||||
/tokens:
|
/tokens/{xtat}/validate:
|
||||||
parameters:
|
parameters:
|
||||||
post:
|
- name: xtat
|
||||||
|
in: path
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: uuid
|
||||||
|
required: true
|
||||||
|
description: The xTAT for the token for which the status needs to be checked
|
||||||
|
- name: customerProfileId
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 323
|
||||||
|
required: false
|
||||||
|
description: The id of the customer Profile for which the request is being done, if customer has identified themselves
|
||||||
|
patch:
|
||||||
tags:
|
tags:
|
||||||
- tokens
|
- tokens
|
||||||
summary: Create a new token entry in the vault, if the customerProfileId has been supplied create in the customerToken DB otherwise in the AnonymousToken DB
|
summary: Validate the supplied OTP and secure and/or authorize the token
|
||||||
description: Create a new token entry in the vault, if the customerProfileId has been supplied create in the customerToken DB otherwise in the AnonymousToken DB
|
description: Validate the supplied OTP and secure and/or authorize the token if the customerProfileId has been supplied look in the customerToken DB otherwise check the AnonymousToken DB.
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/CreateTokenBody"
|
$ref: "#/components/schemas/ValidateTokenBody"
|
||||||
examples:
|
examples:
|
||||||
token:
|
token:
|
||||||
value:
|
value:
|
||||||
{
|
{
|
||||||
"xTAT": "cf694905-7f76-4799-b0bc-490716921323",
|
"otp": "1234564"
|
||||||
"otpKey": "123456789123456789123456789abcde"
|
|
||||||
}
|
}
|
||||||
responses:
|
responses:
|
||||||
"201":
|
"200":
|
||||||
description: Created
|
description: OK
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/unavailable"
|
$ref: "#/components/schemas/TokenStatusResponse"
|
||||||
example:
|
examples:
|
||||||
|
Not secured, not authorized :
|
||||||
|
summary: Not secured, not authorized
|
||||||
|
value:
|
||||||
{
|
{
|
||||||
"Ok"
|
"isAuthorized": false,
|
||||||
|
"isSecured": false
|
||||||
|
}
|
||||||
|
Secured, not authorized :
|
||||||
|
summary: Secured, not authorized
|
||||||
|
value:
|
||||||
|
{
|
||||||
|
"isAuthorized": true,
|
||||||
|
"isSecured": false
|
||||||
|
}
|
||||||
|
Secured and authorized :
|
||||||
|
summary: Secured and authorized
|
||||||
|
value:
|
||||||
|
{
|
||||||
|
"isAuthorized": true,
|
||||||
|
"isSecured": true
|
||||||
}
|
}
|
||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
@ -212,6 +320,7 @@ components:
|
|||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
- xTAT
|
- xTAT
|
||||||
|
- otpKey
|
||||||
properties:
|
properties:
|
||||||
xTAT:
|
xTAT:
|
||||||
type : string
|
type : string
|
||||||
@ -237,3 +346,14 @@ components:
|
|||||||
description: >-
|
description: >-
|
||||||
Does HTM have the authorization to access the secured the data of the OVpas
|
Does HTM have the authorization to access the secured the data of the OVpas
|
||||||
example: False
|
example: False
|
||||||
|
ValidateTokenBody:
|
||||||
|
description: Body for when the a token entry is validated
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- otp
|
||||||
|
properties:
|
||||||
|
otp:
|
||||||
|
type : string
|
||||||
|
description: >-
|
||||||
|
OTP to be used to secure the token and retrieve the JWT at GBO
|
||||||
|
example: 1234567
|
||||||
Loading…
Reference in New Issue
Block a user