This repository has been archived by the owner on Mar 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathspecification.yaml
85 lines (83 loc) · 2.42 KB
/
specification.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
82
83
84
85
openapi: 3.0.3
info:
description: "An OAuth OpenID Connect provider integration as a service"
version: "1.0.20"
title: "Gatekeeper"
contact:
name: "Julius Pedersen"
email: "[email protected]"
tags:
- name: "REST"
description: "Entrypoints designed to be used programmatically"
- name: "redirects"
description: "Entrypoints designed to be navigated to"
paths:
/userinfo:
get:
tags:
- REST
summary: "Acquire information about the user"
description: "Mirrors the authentication provider's /userinfo entrypoint. Returns information about the user"
parameters:
- in: "cookie"
name: "access_token"
required: true
description: "Access token representing a user session"
content:
"text": {}
responses:
200:
description: Object containing user info as per result from authentication provider
content:
application/json:
schema:
$ref: "#/components/schemas/UserinfoResponse"
401:
description: "Missing or invalid access token"
/logout:
post:
tags:
- REST
summary: Terminates a user session
description: Used to invalidate a user session
parameters:
- in: "cookie"
name: "access_token"
required: true
description: "Access token representing a user session"
content:
"text": {}
responses:
200:
description: "OK"
401:
description: "No valid session to log out"
/login:
get:
tags:
- redirects
summary: "Initiate a user session"
description: "Generates required configuration and redirects to the authentication provider"
parameters:
- in: query
name: redirect
required: true
description: Full URL to redirect back to on successful login
content:
"url": {}
responses:
302:
description: >
Will redirect the user to the authentication provider's login form. If the login is
successful it will return the user back to the url specified in the redirect query
parameter.
components:
schemas:
UserinfoResponse:
description: User information as returned by the authentication provider
type: object
properties:
sub:
type: string
preferredName:
type: string