aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat-openapi2.yml
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-03 16:52:42 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-03 16:52:42 -0800
commit2ff1adeeb85c23df1dd6de3c2dd9ebede2a04954 (patch)
tree26648aa0343cfb2fcf73fdfb144a21cd882b0728 /fatcat-openapi2.yml
parent10ddca2c2fd6b14bbd94fe57aed66a6de03e1777 (diff)
downloadfatcat-2ff1adeeb85c23df1dd6de3c2dd9ebede2a04954.tar.gz
fatcat-2ff1adeeb85c23df1dd6de3c2dd9ebede2a04954.zip
crude /auth/oidc endpoint (and codegen)
Diffstat (limited to 'fatcat-openapi2.yml')
-rw-r--r--fatcat-openapi2.yml65
1 files changed, 65 insertions, 0 deletions
diff --git a/fatcat-openapi2.yml b/fatcat-openapi2.yml
index b7f7fbb3..fcef1c46 100644
--- a/fatcat-openapi2.yml
+++ b/fatcat-openapi2.yml
@@ -443,6 +443,12 @@ definitions:
username:
type: string
example: "zerocool93"
+ is_admin:
+ type: boolean
+ is_bot:
+ type: boolean
+ is_active:
+ type: boolean
editgroup:
type: object
properties:
@@ -546,6 +552,29 @@ definitions:
additionalProperties: {}
role:
type: string
+ auth_oidc:
+ type: object
+ required:
+ - provider
+ - sub
+ - iss
+ properties:
+ provider:
+ type: string
+ sub:
+ type: string
+ iss:
+ type: string
+ auth_oidc_result:
+ type: object
+ required:
+ - editor
+ - token
+ properties:
+ editor:
+ $ref: "#/definitions/editor"
+ token:
+ type: string
x-auth-responses: &AUTHRESPONSES
401:
@@ -2616,3 +2645,39 @@ paths:
description: Generic Error
schema:
$ref: "#/definitions/error_response"
+ /auth/oidc:
+ post:
+ operationId: "auth_oidc"
+ tags: # TAGLINE
+ security:
+ # required admin privs
+ - Bearer: []
+ parameters:
+ - name: oidc_params
+ in: body
+ required: true
+ schema:
+ $ref: "#/definitions/auth_oidc"
+ responses:
+ 200:
+ description: Found
+ schema:
+ $ref: "#/definitions/auth_oidc_result"
+ 201:
+ description: Created
+ schema:
+ $ref: "#/definitions/auth_oidc_result"
+ 400:
+ description: Bad Request
+ schema:
+ $ref: "#/definitions/error_response"
+ 409:
+ description: Conflict
+ schema:
+ $ref: "#/definitions/error_response"
+ 500:
+ description: Generic Error
+ schema:
+ $ref: "#/definitions/error_response"
+ <<: *AUTHRESPONSES
+