Repository navigation
Expand file tree
/
Copy pathopenapi.yaml
More file actions
6590 lines (6590 loc) · 212 KB
/
Copy pathopenapi.yaml
File metadata and controls
6590 lines (6590 loc) · 212 KB
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# OpenAPI 3.0 specification of the Fulla OAuth2/OIDC authorization server.
#
# Governance (2026-08, spec-governance M0):
# - This file is the SINGLE SOURCE OF TRUTH for the HTTP API contract
# (client SDK generation, endpoint consistency gate, breaking-change gate).
# - tools/openapi-governance/check_spec_governance.py (CI static-checks)
# asserts: METHOD+path set == C++ doc registrations == Drogon routes
# (modulo documented exclusions), and info.version == cmake/Version.cmake.
# - .github/workflows/openapi-governance.yml runs `oasdiff breaking` against
# the base branch; breaking changes require a major bump or an entry in
# tools/openapi-governance/oasdiff-breaking-ignore.md.
# - After editing controllers or this file, run:
# python tools/openapi-governance/check_spec_governance.py
# python -m openapi_spec_validator apps/server/openapi.yaml
components:
schemas:
Error:
description: >-
The nested error object of the application error envelope. Application
(non-OAuth2-protocol) endpoints respond with {"error": {...}} on
failure; /oauth2/* and /.well-known/* endpoints use RFC 6749 §5.2
bodies instead (see OAuth2Error).
properties:
category:
type: string
description: Error category, e.g. VALIDATION / AUTH / AUTHZ / DB / INTERNAL.
code:
type: string
description: Machine-readable error code, e.g. VALIDATION_INVALID_INPUT.
message:
type: string
request_id:
type: string
numeric_code:
type: integer
description: Numeric catalog code (present iff the code is registered, e.g. 3001).
details:
type: string
description: Extra context; only emitted when the server runs in non-production mode.
type: object
ErrorEnvelope:
description: Application-endpoint error wrapper.
properties:
error:
$ref: '#/components/schemas/Error'
required:
- error
type: object
OAuth2Error:
description: >-
RFC 6749 §5.2 error body used by /oauth2/* and /.well-known/*
endpoints (with Cache-Control: no-store). HTTP status per code:
invalid_request 400, invalid_client 401, invalid_grant 400,
unauthorized_client 400, unsupported_grant_type 400, invalid_scope 400,
access_denied 403, authorization_pending 400, slow_down 400,
expired_token 400, server_error 500, temporarily_unavailable 503.
Bearer-protected resources (userinfo) additionally use the RFC 6750
section 3.1 codes invalid_token (401) and insufficient_scope (403).
properties:
error:
type: string
enum:
- invalid_request
- invalid_client
- invalid_grant
- unauthorized_client
- unsupported_grant_type
- invalid_scope
- access_denied
- unsupported_token_type
- invalid_token
- insufficient_scope
- authorization_pending
- slow_down
- expired_token
- server_error
- temporarily_unavailable
error_description:
type: string
error_uri:
type: string
required:
- error
type: object
TokenResponse:
description: >-
Token endpoint success body (grant-dependent fields). authorization_code:
access_token/token_type/expires_in/refresh_token/roles + id_token iff
scope includes openid (no scope echo). refresh_token: rotated
refresh_token, no roles. client_credentials: scope echo, NO
refresh_token. device_code: refresh_token + optional scope/id_token.
Always carries Cache-Control: no-store / Pragma: no-cache.
properties:
access_token:
type: string
token_type:
type: string
description: Always "Bearer".
expires_in:
type: integer
format: int64
description: Seconds until access_token expiry.
refresh_token:
type: string
description: Present for grants that issue refresh tokens (rotated on refresh).
scope:
type: string
description: Space-separated scopes; echoed for client_credentials/device grants only.
roles:
type: array
items:
type: string
description: Role names; authorization_code grant only.
id_token:
type: string
description: OIDC ID token (JWT); present iff scope includes openid and signing keys are configured.
required:
- access_token
- token_type
- expires_in
type: object
SocialLoginTokenResponse:
description: >-
First-party token pair issued by a social login endpoint
(/api/{github,google,wechat}/login) once the provider identity is
linked to a local account (or auto-created on first login). Issued
for the configured first-party client
(external_auth.social_token_client_id, default fulla-portal) with
scope "openid profile email". Recorded as a SOCIAL_LOGIN_TOKEN_ISSUED
audit event (NOT a consent row) — an explicit social-consent
interaction is a registered follow-up.
properties:
access_token:
type: string
token_type:
type: string
description: Always "Bearer".
expires_in:
type: integer
format: int64
refresh_token:
type: string
required:
- access_token
- token_type
- expires_in
- refresh_token
type: object
WebAuthnRegistrationCredential:
description: >-
Browser PublicKeyCredential for navigator.credentials.create()
(#142). All binary fields are base64url without padding. The server
ignores any client-submitted public_key: the stored key comes from
the verified attestation object's COSE bytes.
properties:
id:
type: string
description: base64url credential id (must equal rawId).
rawId:
type: string
response:
type: object
properties:
attestationObject:
type: string
description: base64url CBOR attestation object (fmt "none" only).
clientDataJSON:
type: string
required:
- attestationObject
- clientDataJSON
name:
type: string
description: Optional human-readable label (default "Passkey").
required:
- id
- rawId
- response
type: object
WebAuthnAssertionCredential:
description: >-
Browser PublicKeyCredential for navigator.credentials.get() (#142).
All binary fields are base64url without padding.
properties:
id:
type: string
description: base64url credential id (must equal rawId).
rawId:
type: string
response:
type: object
properties:
authenticatorData:
type: string
clientDataJSON:
type: string
signature:
type: string
description: base64url ASN.1 DER ECDSA signature.
required:
- authenticatorData
- clientDataJSON
- signature
userHandle:
type: string
description: Optional base64url user handle; when present it must
name the credential's owner.
required:
- id
- rawId
- response
type: object
IntrospectionResponse:
description: >-
RFC 7662 introspection body. Inactive tokens return {"active": false}
only. Active responses always carry iss (backfilled from config);
Cache-Control: no-store.
properties:
active:
type: boolean
client_id:
type: string
token_type:
type: string
description: Always "Bearer" when active.
exp:
type: integer
format: int64
iat:
type: integer
format: int64
nbf:
type: integer
format: int64
sub:
type: string
description: Resource-owner subject; "client:<id>" for client_credentials tokens.
aud:
type: string
iss:
type: string
scope:
type: string
description: Space-separated scopes.
org_id:
type: integer
format: int32
description: 'v1.4.0: present when the token was issued in org context
(authorize org_id parameter). The token''s own binding; roles/name
stay userinfo-only.'
required:
- active
type: object
UserInfoResponse:
description: >-
OIDC Core §5.3 userinfo claims, scope-gated per §5.4 (P0-2): profile
claims (name/preferred_username/picture) require the profile scope;
email/email_verified require the email scope; sub is unconditional.
email_verified present iff email present; roles present iff
non-empty. org_ctx present iff the token was issued in org context,
carries the org scope, and the user is still a member (v1.4.0;
membership is re-checked in real time).
properties:
sub:
type: string
description: Subject (public user id, stringified).
name:
type: string
description: 'display_name when set, else username, else email
(profile scope).'
preferred_username:
type: string
description: 'Standard OIDC claim name (profile scope); the legacy
username key dual-emits alongside it until v1.6.0.'
username:
type: string
description: 'Legacy key (deprecated, removed in v1.6.0) — use
preferred_username (profile scope).'
picture:
type: string
description: Avatar URL (profile scope).
email:
type: string
description: Email address (email scope).
email_verified:
type: boolean
description: Email verification status (email scope).
roles:
type: array
items:
type: string
org_ctx:
type: object
description: 'v1.4.0: the ACTIVE organization context (id + name + the
user''s current roles in it); active-org-only, never the full
membership list.'
properties:
org_id:
type: integer
format: int32
org_name:
type: string
roles:
type: array
items:
type: string
required:
- sub
- name
type: object
OpenIDConfiguration:
description: OIDC Discovery 1.0 provider metadata.
properties:
issuer:
type: string
authorization_endpoint:
type: string
token_endpoint:
type: string
device_authorization_endpoint:
type: string
userinfo_endpoint:
type: string
jwks_uri:
type: string
introspection_endpoint:
type: string
revocation_endpoint:
type: string
registration_endpoint:
type: string
scopes_supported:
type: array
items:
type: string
response_types_supported:
type: array
items:
type: string
grant_types_supported:
type: array
items:
type: string
subject_types_supported:
type: array
items:
type: string
id_token_signing_alg_values_supported:
type: array
items:
type: string
token_endpoint_auth_methods_supported:
type: array
items:
type: string
code_challenge_methods_supported:
type: array
items:
type: string
prompt_values_supported:
type: array
items:
type: string
acr_values_supported:
type: array
items:
type: string
end_session_endpoint:
type: string
backchannel_logout_supported:
type: boolean
backchannel_logout_session_supported:
type: boolean
claims_supported:
type: array
items:
type: string
type: object
OAuthAuthorizationServerMetadata:
description: RFC 8414 authorization server metadata (no userinfo/jwks entries; OIDC discovery carries those).
properties:
issuer:
type: string
authorization_endpoint:
type: string
token_endpoint:
type: string
device_authorization_endpoint:
type: string
introspection_endpoint:
type: string
introspection_endpoint_auth_methods_supported:
type: array
items:
type: string
revocation_endpoint:
type: string
revocation_endpoint_auth_methods_supported:
type: array
items:
type: string
registration_endpoint:
type: string
scopes_supported:
type: array
items:
type: string
response_types_supported:
type: array
items:
type: string
response_modes_supported:
type: array
items:
type: string
grant_types_supported:
type: array
items:
type: string
subject_types_supported:
type: array
items:
type: string
code_challenge_methods_supported:
type: array
items:
type: string
token_endpoint_auth_methods_supported:
type: array
items:
type: string
service_documentation:
type: string
op_policy_uri:
type: string
op_tos_uri:
type: string
type: object
JWKSet:
description: 'RFC 7517 JSON Web Key Set (Cache-Control: public, max-age=3600).'
properties:
keys:
type: array
items:
type: object
properties:
kty:
type: string
kid:
type: string
use:
type: string
alg:
type: string
n:
type: string
e:
type: string
x5c:
type: array
items:
type: string
required:
- kty
required:
- keys
type: object
LoginSuccessResponse:
description: /oauth2/login success when json=true (otherwise a 302 redirect with code+state query).
properties:
code:
type: string
description: The issued authorization code.
location:
type: string
description: Full redirect URI with code and state query parameters.
required:
- code
- location
type: object
MfaRequiredResponse:
description: /oauth2/login response when the account has MFA enabled; complete the flow at POST /oauth2/mfa/verify.
properties:
mfa_required:
type: boolean
mfa_token:
type: string
description: Pending-MFA token to submit to /oauth2/mfa/verify.
message:
type: string
required:
- mfa_required
- mfa_token
type: object
PasswordChangeRequiredResponse:
description: '/oauth2/login response while the account is flagged must_change_password
(#145: bootstrap admin, admin-created users). No authorization code is
issued until the password is changed via POST /oauth2/password/change.'
properties:
password_change_required:
type: boolean
message:
type: string
required:
- password_change_required
type: object
MessageResponse:
properties:
message:
type: string
required:
- message
type: object
SocialLinkEntry:
description: One social provider identity linked to the current user.
properties:
provider:
type: string
enum: [github, google, wechat]
subject:
type: string
description: Provider-scoped stable id (GitHub numeric id, Google
sub, WeChat openid).
linked_at:
type: string
description: Mapping row creation timestamp.
required:
- provider
- subject
type: object
SocialLinksList:
properties:
social_links:
type: array
items:
$ref: '#/components/schemas/SocialLinkEntry'
total:
type: integer
required:
- social_links
- total
type: object
SocialLinkResult:
description: Result of a link/unlink mutation.
properties:
provider:
type: string
enum: [github, google, wechat]
subject:
type: string
description: Provider subject (link success; unlink success keeps
the removed subject).
message:
type: string
required:
- provider
- message
type: object
AuthProvider:
description: An external login provider currently enabled on this
deployment (v1.4.0 provider tiers). authorize_url is the fully built
provider authorize URL — the SPA redirects to it as-is; the redirect
target resolves from the per-provider redirect_uri override, else
frontend.url + /callback/{provider}.
properties:
authorize_url:
type: string
provider:
type: string
enum: [github, google, wechat]
required:
- provider
- authorize_url
type: object
AuthProvidersResponse:
description: External login provider discovery. An empty list means
external login is disabled on this deployment.
properties:
providers:
type: array
items:
$ref: '#/components/schemas/AuthProvider'
required:
- providers
type: object
DeviceAuthorizationResponse:
description: 'RFC 8628 device authorization response. The verification URIs
point at the admin console device-approval page by default (admin_console.url
config + /admin/devices, #146); override with
custom_config.device_authorization.verification_uri.'
properties:
device_code:
type: string
user_code:
type: string
description: 8 characters from the A-Z2-9 alphabet (no 0/1/I/O).
verification_uri:
type: string
description: Page the user visits to approve the device (admin console
/admin/devices by default).
verification_uri_complete:
type: string
description: 'verification_uri with ?user_code=<code> appended (RFC 8628
§3.3.1) so the approval page can prefill the code.'
expires_in:
type: integer
description: Device code lifetime in seconds (600).
interval:
type: integer
description: Required polling interval in seconds (5).
required:
- device_code
- user_code
- verification_uri
- expires_in
- interval
type: object
HealthStatus:
properties:
status:
type: string
enum:
- ok
- degraded
- unhealthy
service:
type: string
timestamp:
type: integer
format: int64
storage_type:
type: string
database:
type: string
description: connected / disconnected / not_configured / unknown
redis:
type: string
description: connected / disconnected / not_configured
required:
- status
type: object
Organization:
properties:
id:
type: integer
slug:
type: string
name:
type: string
logo_uri:
type: string
primary_color:
type: string
issuer_override:
type: string
type: object
TokenRequest:
description: >-
RFC 6749 §4.1.3 token request (form-encoded). Field requirements are
grant-dependent: authorization_code needs code (+ redirect_uri +
code_verifier when PKCE was used); refresh_token needs refresh_token;
client_credentials may send scope; device_code needs device_code.
Client auth follows the client's registered
token_endpoint_auth_method (F-017): client_secret_basic (default)
-> HTTP Basic ONLY; client_secret_post -> these form fields ONLY;
'none' (PUBLIC) -> client_id only, secrets rejected.
properties:
grant_type:
type: string
enum:
- authorization_code
- refresh_token
- client_credentials
- urn:ietf:params:oauth:grant-type:device_code
code:
type: string
description: Authorization code (required for grant_type=authorization_code).
redirect_uri:
type: string
description: Required for the authorization_code grant.
refresh_token:
type: string
description: Required for grant_type=refresh_token (rotated on use).
code_verifier:
type: string
description: 'PKCE code_verifier (RFC 7636): required for
authorization_code when the login/authorize request carried a
code_challenge.'
client_id:
type: string
description: Client identifier (alternative to HTTP Basic authentication).
client_secret:
type: string
description: Client secret for CONFIDENTIAL clients with
token_endpoint_auth_method=client_secret_post; FORBIDDEN for
PUBLIC clients whose method is 'none' (F-017).
scope:
type: string
description: Space-separated scopes (client_credentials grant only).
device_code:
type: string
description: Required for the device_code grant (from
/oauth2/device_authorization).
required:
- grant_type
type: object
LoginRequest:
description: /oauth2/login credentials (JSON body or form-encoded; query also accepted).
properties:
username:
type: string
description: Account username or email.
password:
type: string
client_id:
type: string
description: Matches the requesting app (required for code issuance).
redirect_uri:
type: string
description: Must match the registered client.
scope:
type: string
description: Space-separated (optional).
state:
type: string
description: Opaque value maintained between request and callback (recommended).
code_challenge:
type: string
description: PKCE code challenge (RFC 7636). REQUIRED for PUBLIC
clients (fulla-portal, fulla-admin-console) when
auth.require_pkce_for_public is enabled (default true, F-011 /
RFC 9700 §2.1.1). The matching code_verifier must be sent on the
/oauth2/token exchange.
code_challenge_method:
type: string
description: 'S256 (recommended) or plain.'
nonce:
type: string
description: OIDC nonce (anti-replay), echoed in the id_token.
json:
type: string
description: 'Set to "true" to receive a JSON body instead of a 302 redirect.'
required:
- username
- password
type: object
MfaVerifyRequest:
description: /oauth2/mfa/verify completion payload (JSON body or form-encoded).
properties:
mfa_token:
type: string
description: The MFA pending token returned by /oauth2/login when
mfa_required was true.
code:
type: string
description: The 6-digit TOTP code from the user's authenticator.
client_id:
type: string
description: Must match the first-factor login.
redirect_uri:
type: string
description: Must match the first-factor login.
scope:
type: string
description: Defaults to "openid profile email".
nonce:
type: string
code_verifier:
type: string
description: PKCE code_verifier matching the code_challenge sent on
the first-factor /oauth2/login step. Required for PUBLIC clients.
required:
- mfa_token
- code
- client_id
- redirect_uri
type: object
securitySchemes:
bearerAuth:
scheme: bearer
type: http
clientCredentialsAuth:
description: 'OAuth2 client authentication (RFC 6749 §2.3): client_id and client_secret
via HTTP Basic Authorization header or POST body parameters.'
scheme: basic
type: http
info:
description: OAuth2.0 authorization server with token management
title: OAuth2 Authorization Server API
version: 1.6.0
openapi: 3.0.0
paths:
/.well-known/jwks.json:
get:
description: Returns the public keys used by this server to sign JWTs. With a
signing keystore configured (#110) EVERY loaded key is published so tokens
keep verifying across the rotation grace window; the active signer is the
kid the issued JWT headers carry.
operationId: get_.well-known_jwks.json
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/JWKSet'
description: JSON Web Key Set
summary: JSON Web Key Set
tags:
- OpenID Connect
- Security
/.well-known/oauth-authorization-server:
get:
description: RFC 8414 OAuth 2.0 Authorization Server Metadata. Unlike the OIDC
discovery document this carries no userinfo/jwks entries.
operationId: get_.well-known_oauth-authorization-server
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/OAuthAuthorizationServerMetadata'
description: Authorization Server Metadata
summary: OAuth 2.0 Authorization Server Metadata
tags:
- OAuth2
- Discovery
/.well-known/openid-configuration:
get:
description: Returns OIDC discovery metadata including endpoints and supported
scopes.
operationId: get_.well-known_openid-configuration
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/OpenIDConfiguration'
description: OIDC Provider Metadata
summary: OpenID Connect Discovery
tags:
- OpenID Connect
/api/admin/claim-mappings:
get:
description: 'P1-3 (#280): all claim mappings (id_token/userinfo claim
publication).'
operationId: get_api_admin_claim_mappings
responses:
'200':
content:
application/json:
schema:
type: object
properties:
status:
type: string
total:
type: integer
mappings:
type: array
items:
type: object
properties:
id:
type: integer
scope_name:
type: string
claim_name:
type: string
source_path:
type: string
include_in:
type: string
enabled:
type: boolean
description: Mapping list
security:
- bearerAuth: []
summary: List Claim Mappings
tags:
- Admin
- Scopes
post:
description: 'P1-3 (#280): map a source (custom_attributes.<key> or
user.display_name) to a published claim under a trigger scope. Red
lines: claim_name must not be reserved (CLAIM_MAPPING_RESERVED_CLAIM);
scope_name must not be openid (CLAIM_MAPPING_FORBIDDEN_SCOPE);
source_path must be whitelisted (CLAIM_MAPPING_INVALID_SOURCE).'
operationId: post_api_admin_claim_mappings
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- scope_name
- claim_name
- source_path
properties:
scope_name:
type: string
claim_name:
type: string
source_path:
type: string
include_in:
type: string
enum:
- id_token
- userinfo
- both
default: both
responses:
'201':
description: Mapping created
'400':
description: Red-line rejection or invalid shape
security:
- bearerAuth: []
summary: Create Claim Mapping
tags:
- Admin
- Scopes
/api/admin/claim-mappings/{mappingId}:
put:
description: 'P1-3 (#280): update a mapping (full body).'
operationId: put_api_admin_claim_mappings_{mappingId}
parameters:
- description: Mapping ID
in: path
name: mappingId
required: true
schema:
type: integer
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- scope_name
- claim_name
- source_path
properties:
scope_name:
type: string
claim_name:
type: string
source_path:
type: string
include_in:
type: string
enabled:
type: boolean
responses:
'200':
description: Mapping updated
'404':
description: Mapping not found
security:
- bearerAuth: []
summary: Update Claim Mapping
tags:
- Admin
- Scopes
delete:
description: 'P1-3 (#280): delete a mapping.'
operationId: delete_api_admin_claim_mappings_{mappingId}
parameters:
- description: Mapping ID
in: path
name: mappingId
required: true
schema:
type: integer
responses:
'200':
description: Mapping deleted
'404':
description: Mapping not found
security:
- bearerAuth: []
summary: Delete Claim Mapping
tags:
- Admin
- Scopes
/api/admin/clients:
get:
description: Get a paginated list of registered OAuth2 clients.
operationId: get_api_admin_clients
responses:
'200':
description: List of OAuth2 clients
'401':
description: Unauthorized
'403':
description: 'insufficient_scope / insufficient permissions -- the access
token lacks the `admin` scope OR the user lacks the admin role (RFC 6750
§3; on a scope failure accompanied by WWW-Authenticate: Bearer