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

Remove auth related paths #87

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Endpoints `/data/customers` and `/data/salespeople`
- Schemas `Customer` and `Salesperson`
- Tags `customers` and `salespeople`
- [BREAKING CHANGE] Auth-related resources
- Paths
- `/public/guest`
- `/public/register`
- `/public/login`
- `/access`
- `/access/{resource}`
- Unusedd tags
- `authorization`
- `session`

## [v1.7.3] - 2024-03-11

Expand Down
242 changes: 0 additions & 242 deletions src/trebol-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
}
},
"tags": [
{
"name": "authorization"
},
{
"name": "preflight"
},
Expand All @@ -29,9 +26,6 @@
{
"name": "account"
},
{
"name": "session"
},
{
"name": "create"
},
Expand Down Expand Up @@ -82,95 +76,6 @@
}
],
"paths": {
"/access": {
"summary": "Allowed (authorized) access to API routes",
"description": "Operation that hints the API consumer on what paths, routes, or resources can be accessed in the /data API.",
"get": {
"tags": [
"authorization"
],
"responses": {
"200": {
"$ref": "#/components/responses/AuthorizedAccessToRoutes"
},
"403": {
"$ref": "#/components/responses/Error"
}
},
"security": [
{
"AuthorizedRequest": []
}
],
"operationId": "access-routes-get",
"summary": "Query allowed API routes",
"description": "GET the API resource paths that the current session is authorized to use."
},
"options": {
"tags": [
"preflight"
],
"responses": {
"200": {
"$ref": "#/components/responses/AllowMethodGET"
}
},
"security": [
{}
],
"operationId": "access-routes-options",
"summary": "Preflight check for API resource accesses",
"description": "Fetch OPTIONS for communicating with this resource."
}
},
"/access/{resource}": {
"summary": "Authorized access to a certain resource",
"description": "Operation that hints the API consumer on what actions can be performed against another resource in the /data API.",
"get": {
"tags": [
"authorization"
],
"responses": {
"200": {
"$ref": "#/components/responses/AuthorizedAccessToResource"
},
"403": {
"$ref": "#/components/responses/Error"
}
},
"security": [
{
"AuthorizedRequest": []
}
],
"operationId": "access-resource-actions-get",
"summary": "Query allowed API operations on the resource",
"description": "GET operations that the current user is authorized to request against the resource."
},
"options": {
"tags": [
"preflight"
],
"responses": {
"200": {
"$ref": "#/components/responses/AllowMethodGET"
}
},
"operationId": "access-resource-options",
"summary": "Preflight check for resource operation accesses",
"description": "Fetch OPTIONS for communicating with this resource."
},
"parameters": [
{
"name": "resource",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
]
},
"/data/people": {
"summary": "Person data API endpoint",
"description": "Operations to fetch people data. \nEditing operations cannot be done through this resource.",
Expand Down Expand Up @@ -1957,153 +1862,6 @@
"description": "Fetch OPTIONS for communicating with this resource."
}
},
"/public/guest": {
"summary": "Guest session opener",
"description": "",
"post": {
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Person"
}
}
},
"required": true
},
"tags": [
"account",
"session"
],
"responses": {
"200": {
"description": "Normal response; a guest token was generated. It is included in the response headers and body."
},
"403": {
"description": "Erroneous, empty response to improper use; the user was already logged in or using a valid guest token."
}
},
"security": [
{}
],
"operationId": "guest-session-request",
"summary": "Start a guest session",
"description": "POST personal information to generate a token for a temporary guest session."
},
"options": {
"tags": [
"preflight"
],
"responses": {
"200": {
"$ref": "#/components/responses/AllowMethodPOST"
}
},
"security": [
{}
],
"operationId": "guest-session-options",
"summary": "Preflight check for guest session opener",
"description": "Fetch OPTIONS for communicating with this resource."
}
},
"/public/login": {
"summary": "Session opener",
"post": {
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoginCredentials"
}
}
},
"required": true
},
"tags": [
"account",
"session"
],
"responses": {
"200": {
"description": "Normal response; the credentials are correct, and an authorization token was generated. It is included in the response headers and body."
},
"403": {
"description": "Erroneous, empty response, sent when the credentials are rejected."
}
},
"security": [
{}
],
"operationId": "login-request",
"summary": "Start a logged-in session",
"description": "POST credentials to authenticate, generate an authorization token and start a new session."
},
"options": {
"tags": [
"preflight"
],
"responses": {
"200": {
"$ref": "#/components/responses/AllowMethodPOST"
}
},
"security": [
{}
],
"operationId": "login-options",
"summary": "Preflight check for session opener",
"description": "Fetch OPTIONS for communicating with this resource."
}
},
"/public/register": {
"summary": "Account registrar",
"post": {
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserRegistration"
}
}
},
"required": true
},
"tags": [
"account"
],
"responses": {
"200": {
"$ref": "#/components/responses/Empty"
},
"400": {
"$ref": "#/components/responses/Error"
}
},
"security": [
{}
],
"operationId": "register-request",
"summary": "Request a new user account",
"description": "POST details for a new user account, including its profile information."
},
"options": {
"tags": [
"preflight"
],
"responses": {
"200": {
"$ref": "#/components/responses/AllowMethodPOST"
}
},
"security": [
{}
],
"operationId": "register-options",
"summary": "Preflight check for account registrar",
"description": "Fetch OPTIONS for communicating with this resource."
}
},
"/data/billing_types": {
"summary": "Billing types API endpoint",
"description": "Operations to fetch billing types data. \nEditing operations cannot be done through this resource.",
Expand Down
Loading