This repository has been archived by the owner on Dec 18, 2024. It is now read-only.
generated from communitiesuk/funding-service-design-TEMPLATE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.yml
145 lines (143 loc) · 4.36 KB
/
api.yml
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
openapi: "3.0.0"
info:
description: Authentication API for DLUHC Funding Service Design
version: "1.0.0"
title: Funding Service Design - Authenticator
tags:
- name: sso
description: Single sign-on operations
- name: magic links
description: Magic link operations
- name: sessions
description: Session operations
paths:
/magic-links:
get:
tags:
- magic links
summary: Search magic link
description: List all magic links
operationId: api.MagicLinksView.search
responses:
200:
description: SUCCESS - A list of magic link keys
content:
application/json:
schema:
type: array
items:
type: string
post:
tags:
- magic links
summary: Create a magic link
description: Get a fresh magic link for an account holder
operationId: api.MagicLinksView.create
requestBody:
description: Magic link creation parameters
required: true
content:
application/json:
schema:
$ref: 'components.yml#/components/schemas/MagicLinkCreate'
example:
email: 'a@example.com'
redirectUrl: 'https://example.com/redirect-url'
responses:
201:
description: SUCCESS - Active magic link created
content:
application/json:
schema:
$ref: 'components.yml#/components/schemas/MagicLink'
401:
description: ERROR - Could not create magic link
content:
application/json:
schema:
$ref: 'components.yml#/components/schemas/GeneralError'
'/magic-links/{link_id}':
get:
tags:
- magic links
summary: Use a magic link
description: Check if link is valid and redirect to url
operationId: api.MagicLinksView.use
responses:
302:
description: SUCCESS - Redirect valid magic link to requested redirectUrl
404:
description: ERROR - Magic link expired or invalid
content:
application/json:
schema:
$ref: 'components.yml#/components/schemas/GeneralError'
parameters:
- name: link_id
in: path
required: true
schema:
type: string
format: path
/sso/login:
get:
tags:
- sso
summary: Microsoft Authentication Library Login redirect
description: Redirect to Microsoft Authentication Login Flow
operationId: api.sso.routes.SsoView.login
responses:
302:
description: SUCCESS - Redirect to Microsoft Authentication Login Flow
/sso/logout:
get:
tags:
- sso
summary: Microsoft Authentication Library Logout redirect
description: Redirect to Microsoft Authentication Logout Flow
operationId: api.sso.routes.SsoView.logout
responses:
302:
description: SUCCESS - Redirect to Microsoft Authentication Logout Flow
/sso/graph-call:
get:
tags:
- sso
summary: Microsoft Authentication Library graph call
description: Return current user session graph object
operationId: api.sso.routes.SsoView.graph_call
responses:
200:
description: SUCCESS - Valid user graph object
/sso/get-token:
get:
tags:
- sso
summary: Microsoft Authentication Library get token
description: Return current user session authentication token
operationId: api.sso.routes.SsoView.get_token
responses:
200:
description: SUCCESS - Valid user token
/sessions/user:
get:
tags:
- sessions
summary: Get a users session details
description: Get a users session details
operationId: api.AuthSessionView.user
responses:
200:
description: SUCCESS - Active user session details returned
404:
description: ERROR - User session could not be found
/sessions/sign-out:
get:
tags:
- sessions
summary: Signs out a user
description: Signs out a user who has authenticated via a magic link
operationId: api.AuthSessionView.clear_session
responses:
302:
description: SUCCESS - Active user session cleared and redirected to the signed out page