-
Notifications
You must be signed in to change notification settings - Fork 89
/
dummy-oauth.yaml
81 lines (79 loc) · 2.68 KB
/
dummy-oauth.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
openapi: 3.0.2
info:
title: Dummy OAuth Provider
version: 1.0.0
description: >-
This interface exposes the ability to generate OAuth tokens usable by the
DSS according to parameters specified by the client.
components:
schemas:
TokenResponse:
type: object
required:
- access_token
properties:
access_token:
description: JWT that may be used as a Bearer token to authorize operations on an appropriately-configured DSS instance
type: string
BadRequestResponse:
type: object
properties:
message:
description: Human-readable message describing problem with request
type: string
paths:
/token:
get:
parameters:
- name: intended_audience
in: query
required: true
description: Fully-qualified domain name where the service for which this access token will be used is hosted. The `aud` claim will be populated with this value.
schema:
type: string
example: uss.example.com
- name: scope
in: query
required: true
description: Scope or scopes that should be granted in the access token. Multiple scopes can be delimited by spaces (%20) in a single value. The `scope` claim will be populated with all requested scopes.
schema:
type: string
example: dss.read.identification_service_areas
- name: issuer
in: query
required: false
description: Identity of the issuer of the token. The `iss` claim will be populated with this value.
schema:
type: string
example: dummy_oauth
- name: expire
in: query
required: false
description: Unix timestamp (seconds since epoch) of the time this access token should expire. If not specified, defaults to an hour from time of token creation.
schema:
type: integer
format: int64
example: 1532714469
- name: sub
in: query
required: true
description: Identity of client/subscriber requesting access token. The `sub` claim will be populated with this value.
schema:
type: string
example: uss1
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TokenResponse'
description: >-
The requested token was generated successfully
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestResponse'
description: >-
The request was not properly formed
summary: Generate an access token