Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add authentication #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions api.scouting.org/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ externalDocs:
servers:
- url: https://api.scouting.org
tags:
- name: authentication
description: Obtain login JWT & userId
externalDocs:
description: Find out more
url: https://github.com/mmarseglia/scouting-api/blob/main/docs/authentication.md
- name: advancements
description: Everything about Advancement
externalDocs:
Expand All @@ -29,6 +34,35 @@ tags:
description: Find out more about registered Scouts
url: https://github.com/mmarseglia/scouting-api
paths:
/api/users/{username}/authenticate:
servers:
- url: https://my.scouting.org
parameters:
- in: path
name: username
required: true
schema:
type: string
post:
tags:
- authentication
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
password:
type: string
format: password
responses:
"200":
description: 200 response
content:
application/json; version = 2:
schema:
$ref: "#/components/schemas/Authenticate200ResponseBody"
/advancements/ranks:
get:
tags:
Expand Down Expand Up @@ -174,6 +208,71 @@ paths:
$ref: "#/components/schemas/GetAdvancementsRanksRankRequirements200ResponseBody"
components:
schemas:
Authenticate200ResponseBody:
type: object
properties:
sessionToken:
type: string
personGuid:
type: string
format: uuid
userGuid:
type: string
format: uuid
membership:
type: object
properties:
memberId:
type: integer
email:
type: string
format: email
isDelete:
type: boolean
example: false
account:
type: object
properties:
username:
type: string
userId:
type: integer
profile:
type: object
properties:
firstName:
type: string
middleName:
type: string
lastName:
type: string
gender:
type: string
prefix:
type: string
format: nullable
suffix:
type: string
format: nullable
dateOfBirth:
type: string
format: date
userProfile:
type: string
format: nullable
token:
type: string
example: "JWT"
hasMasqueradeRole:
type: boolean
grantType:
type: string
example: "password-myst"
isMfaSignedUp:
type: boolean
mfaDeliveryMethods:
type: array
items: {}
Ranks:
type: object
properties:
Expand Down