feat: add swagger docs for rest of api endpoints

This commit is contained in:
Stavros
2026-07-04 14:56:20 +03:00
parent fb48f1eb2d
commit dcb503b3be
7 changed files with 2516 additions and 136 deletions
+851
View File
@@ -19,6 +19,554 @@ const docTemplate = `{
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/.well-known/jwks.json": {
"get": {
"description": "JWKS Endpoint",
"produces": [
"application/json"
],
"tags": [
"well-known"
],
"summary": "JWKS",
"responses": {
"200": {
"description": "OK"
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
},
"/.well-known/openid-configuration": {
"get": {
"description": "OpenID Connect Configuration Discovery Endpoint",
"produces": [
"application/json"
],
"tags": [
"well-known"
],
"summary": "OpenID Connect Configuration",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.OpenIDConnectConfiguration"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
},
"/.well-known/webfinger": {
"get": {
"description": "WebFinger Endpoint",
"produces": [
"application/json"
],
"tags": [
"well-known"
],
"summary": "WebFinger",
"parameters": [
{
"type": "string",
"description": "Resource",
"name": "resource",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Rel",
"name": "rel",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.WebfingerResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
},
"/api/auth/caddy": {
"get": {
"description": "Forward-Auth Proxy Endpoint",
"produces": [
"application/json"
],
"tags": [
"forward-auth"
],
"summary": "Proxy",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"302": {
"description": "Found"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
},
"/api/auth/envoy": {
"get": {
"description": "Forward-Auth Proxy Endpoint",
"produces": [
"application/json"
],
"tags": [
"forward-auth"
],
"summary": "Proxy",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"302": {
"description": "Found"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
},
"put": {
"description": "Forward-Auth Proxy Endpoint",
"produces": [
"application/json"
],
"tags": [
"forward-auth"
],
"summary": "Proxy",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"302": {
"description": "Found"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
},
"post": {
"description": "Forward-Auth Proxy Endpoint",
"produces": [
"application/json"
],
"tags": [
"forward-auth"
],
"summary": "Proxy",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"302": {
"description": "Found"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
},
"delete": {
"description": "Forward-Auth Proxy Endpoint",
"produces": [
"application/json"
],
"tags": [
"forward-auth"
],
"summary": "Proxy",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"302": {
"description": "Found"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
},
"options": {
"description": "Forward-Auth Proxy Endpoint",
"produces": [
"application/json"
],
"tags": [
"forward-auth"
],
"summary": "Proxy",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"302": {
"description": "Found"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
},
"head": {
"description": "Forward-Auth Proxy Endpoint",
"produces": [
"application/json"
],
"tags": [
"forward-auth"
],
"summary": "Proxy",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"302": {
"description": "Found"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
},
"patch": {
"description": "Forward-Auth Proxy Endpoint",
"produces": [
"application/json"
],
"tags": [
"forward-auth"
],
"summary": "Proxy",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"302": {
"description": "Found"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
},
"/api/auth/nginx": {
"get": {
"description": "Forward-Auth Proxy Endpoint",
"produces": [
"application/json"
],
"tags": [
"forward-auth"
],
"summary": "Proxy",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"302": {
"description": "Found"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
},
"/api/auth/traefik": {
"get": {
"description": "Forward-Auth Proxy Endpoint",
"produces": [
"application/json"
],
"tags": [
"forward-auth"
],
"summary": "Proxy",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"302": {
"description": "Found"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
},
"/api/context/app": {
"get": {
"description": "Get the app context",
@@ -231,6 +779,161 @@ const docTemplate = `{
}
}
},
"/api/user/login": {
"post": {
"description": "Login Endpoint",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"accounts"
],
"summary": "Login",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.TotpPendingResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"429": {
"description": "Too Many Requests",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
},
"/api/user/logout": {
"post": {
"description": "Logout Endpoint",
"produces": [
"application/json"
],
"tags": [
"accounts"
],
"summary": "Logout",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
},
"/api/user/tailscale": {
"post": {
"description": "Tailscale Auth Endpoint (Experimental)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"accounts"
],
"summary": "Tailscale",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
},
"/api/user/totp": {
"post": {
"description": "TOTP Endpoint",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"accounts"
],
"summary": "TOTP",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"429": {
"description": "Too Many Requests",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
},
"/authorize": {
"get": {
"description": "OpenID Connect Authorize Endpoint",
@@ -724,6 +1427,41 @@ const docTemplate = `{
}
}
}
},
"/resources/{resource}": {
"get": {
"description": "Get a resource by file name",
"tags": [
"resources"
],
"summary": "Resources Endpoint",
"parameters": [
{
"type": "string",
"description": "Resource Name",
"name": "resource",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK"
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
}
},
"definitions": {
@@ -836,6 +1574,80 @@ const docTemplate = `{
}
}
},
"controller.OpenIDConnectConfiguration": {
"type": "object",
"properties": {
"authorization_endpoint": {
"type": "string"
},
"claims_supported": {
"type": "array",
"items": {
"type": "string"
}
},
"grant_types_supported": {
"type": "array",
"items": {
"type": "string"
}
},
"id_token_signing_alg_values_supported": {
"type": "array",
"items": {
"type": "string"
}
},
"issuer": {
"type": "string"
},
"jwks_uri": {
"type": "string"
},
"request_object_signing_alg_values_supported": {
"type": "array",
"items": {
"type": "string"
}
},
"request_parameter_supported": {
"type": "boolean"
},
"response_types_supported": {
"type": "array",
"items": {
"type": "string"
}
},
"scopes_supported": {
"type": "array",
"items": {
"type": "string"
}
},
"service_documentation": {
"type": "string"
},
"subject_types_supported": {
"type": "array",
"items": {
"type": "string"
}
},
"token_endpoint": {
"type": "string"
},
"token_endpoint_auth_methods_supported": {
"type": "array",
"items": {
"type": "string"
}
},
"userinfo_endpoint": {
"type": "string"
}
}
},
"controller.SimpleResponse": {
"type": "object",
"properties": {
@@ -847,6 +1659,20 @@ const docTemplate = `{
}
}
},
"controller.TotpPendingResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"status": {
"type": "integer"
},
"totpPending": {
"type": "boolean"
}
}
},
"controller.UCRAuth": {
"type": "object",
"properties": {
@@ -917,6 +1743,31 @@ const docTemplate = `{
}
}
},
"controller.WebfingerResponse": {
"type": "object",
"properties": {
"links": {
"type": "array",
"items": {
"$ref": "#/definitions/controller.WebfingerResponseLink"
}
},
"subject": {
"type": "string"
}
}
},
"controller.WebfingerResponseLink": {
"type": "object",
"properties": {
"href": {
"type": "string"
},
"rel": {
"type": "string"
}
}
},
"model.AddressClaim": {
"type": "object",
"properties": {
+851
View File
@@ -12,6 +12,554 @@
},
"basePath": "/",
"paths": {
"/.well-known/jwks.json": {
"get": {
"description": "JWKS Endpoint",
"produces": [
"application/json"
],
"tags": [
"well-known"
],
"summary": "JWKS",
"responses": {
"200": {
"description": "OK"
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
},
"/.well-known/openid-configuration": {
"get": {
"description": "OpenID Connect Configuration Discovery Endpoint",
"produces": [
"application/json"
],
"tags": [
"well-known"
],
"summary": "OpenID Connect Configuration",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.OpenIDConnectConfiguration"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
},
"/.well-known/webfinger": {
"get": {
"description": "WebFinger Endpoint",
"produces": [
"application/json"
],
"tags": [
"well-known"
],
"summary": "WebFinger",
"parameters": [
{
"type": "string",
"description": "Resource",
"name": "resource",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Rel",
"name": "rel",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.WebfingerResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
},
"/api/auth/caddy": {
"get": {
"description": "Forward-Auth Proxy Endpoint",
"produces": [
"application/json"
],
"tags": [
"forward-auth"
],
"summary": "Proxy",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"302": {
"description": "Found"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
},
"/api/auth/envoy": {
"get": {
"description": "Forward-Auth Proxy Endpoint",
"produces": [
"application/json"
],
"tags": [
"forward-auth"
],
"summary": "Proxy",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"302": {
"description": "Found"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
},
"put": {
"description": "Forward-Auth Proxy Endpoint",
"produces": [
"application/json"
],
"tags": [
"forward-auth"
],
"summary": "Proxy",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"302": {
"description": "Found"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
},
"post": {
"description": "Forward-Auth Proxy Endpoint",
"produces": [
"application/json"
],
"tags": [
"forward-auth"
],
"summary": "Proxy",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"302": {
"description": "Found"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
},
"delete": {
"description": "Forward-Auth Proxy Endpoint",
"produces": [
"application/json"
],
"tags": [
"forward-auth"
],
"summary": "Proxy",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"302": {
"description": "Found"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
},
"options": {
"description": "Forward-Auth Proxy Endpoint",
"produces": [
"application/json"
],
"tags": [
"forward-auth"
],
"summary": "Proxy",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"302": {
"description": "Found"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
},
"head": {
"description": "Forward-Auth Proxy Endpoint",
"produces": [
"application/json"
],
"tags": [
"forward-auth"
],
"summary": "Proxy",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"302": {
"description": "Found"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
},
"patch": {
"description": "Forward-Auth Proxy Endpoint",
"produces": [
"application/json"
],
"tags": [
"forward-auth"
],
"summary": "Proxy",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"302": {
"description": "Found"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
},
"/api/auth/nginx": {
"get": {
"description": "Forward-Auth Proxy Endpoint",
"produces": [
"application/json"
],
"tags": [
"forward-auth"
],
"summary": "Proxy",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"302": {
"description": "Found"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
},
"/api/auth/traefik": {
"get": {
"description": "Forward-Auth Proxy Endpoint",
"produces": [
"application/json"
],
"tags": [
"forward-auth"
],
"summary": "Proxy",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"302": {
"description": "Found"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
},
"/api/context/app": {
"get": {
"description": "Get the app context",
@@ -224,6 +772,161 @@
}
}
},
"/api/user/login": {
"post": {
"description": "Login Endpoint",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"accounts"
],
"summary": "Login",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.TotpPendingResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"429": {
"description": "Too Many Requests",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
},
"/api/user/logout": {
"post": {
"description": "Logout Endpoint",
"produces": [
"application/json"
],
"tags": [
"accounts"
],
"summary": "Logout",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
},
"/api/user/tailscale": {
"post": {
"description": "Tailscale Auth Endpoint (Experimental)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"accounts"
],
"summary": "Tailscale",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
},
"/api/user/totp": {
"post": {
"description": "TOTP Endpoint",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"accounts"
],
"summary": "TOTP",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"429": {
"description": "Too Many Requests",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
},
"/authorize": {
"get": {
"description": "OpenID Connect Authorize Endpoint",
@@ -717,6 +1420,41 @@
}
}
}
},
"/resources/{resource}": {
"get": {
"description": "Get a resource by file name",
"tags": [
"resources"
],
"summary": "Resources Endpoint",
"parameters": [
{
"type": "string",
"description": "Resource Name",
"name": "resource",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK"
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/controller.SimpleResponse"
}
}
}
}
}
},
"definitions": {
@@ -829,6 +1567,80 @@
}
}
},
"controller.OpenIDConnectConfiguration": {
"type": "object",
"properties": {
"authorization_endpoint": {
"type": "string"
},
"claims_supported": {
"type": "array",
"items": {
"type": "string"
}
},
"grant_types_supported": {
"type": "array",
"items": {
"type": "string"
}
},
"id_token_signing_alg_values_supported": {
"type": "array",
"items": {
"type": "string"
}
},
"issuer": {
"type": "string"
},
"jwks_uri": {
"type": "string"
},
"request_object_signing_alg_values_supported": {
"type": "array",
"items": {
"type": "string"
}
},
"request_parameter_supported": {
"type": "boolean"
},
"response_types_supported": {
"type": "array",
"items": {
"type": "string"
}
},
"scopes_supported": {
"type": "array",
"items": {
"type": "string"
}
},
"service_documentation": {
"type": "string"
},
"subject_types_supported": {
"type": "array",
"items": {
"type": "string"
}
},
"token_endpoint": {
"type": "string"
},
"token_endpoint_auth_methods_supported": {
"type": "array",
"items": {
"type": "string"
}
},
"userinfo_endpoint": {
"type": "string"
}
}
},
"controller.SimpleResponse": {
"type": "object",
"properties": {
@@ -840,6 +1652,20 @@
}
}
},
"controller.TotpPendingResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"status": {
"type": "integer"
},
"totpPending": {
"type": "boolean"
}
}
},
"controller.UCRAuth": {
"type": "object",
"properties": {
@@ -910,6 +1736,31 @@
}
}
},
"controller.WebfingerResponse": {
"type": "object",
"properties": {
"links": {
"type": "array",
"items": {
"$ref": "#/definitions/controller.WebfingerResponseLink"
}
},
"subject": {
"type": "string"
}
}
},
"controller.WebfingerResponseLink": {
"type": "object",
"properties": {
"href": {
"type": "string"
},
"rel": {
"type": "string"
}
}
},
"model.AddressClaim": {
"type": "object",
"properties": {
+562
View File
@@ -70,6 +70,55 @@ definitions:
error:
type: string
type: object
controller.OpenIDConnectConfiguration:
properties:
authorization_endpoint:
type: string
claims_supported:
items:
type: string
type: array
grant_types_supported:
items:
type: string
type: array
id_token_signing_alg_values_supported:
items:
type: string
type: array
issuer:
type: string
jwks_uri:
type: string
request_object_signing_alg_values_supported:
items:
type: string
type: array
request_parameter_supported:
type: boolean
response_types_supported:
items:
type: string
type: array
scopes_supported:
items:
type: string
type: array
service_documentation:
type: string
subject_types_supported:
items:
type: string
type: array
token_endpoint:
type: string
token_endpoint_auth_methods_supported:
items:
type: string
type: array
userinfo_endpoint:
type: string
type: object
controller.SimpleResponse:
properties:
message:
@@ -77,6 +126,15 @@ definitions:
status:
type: integer
type: object
controller.TotpPendingResponse:
properties:
message:
type: string
status:
type: integer
totpPending:
type: boolean
type: object
controller.UCRAuth:
properties:
authenticated:
@@ -122,6 +180,22 @@ definitions:
totp:
$ref: '#/definitions/controller.UCRTOTP'
type: object
controller.WebfingerResponse:
properties:
links:
items:
$ref: '#/definitions/controller.WebfingerResponseLink'
type: array
subject:
type: string
type: object
controller.WebfingerResponseLink:
properties:
href:
type: string
rel:
type: string
type: object
model.AddressClaim:
properties:
country:
@@ -217,6 +291,369 @@ info:
title: Tinyauth API
version: development
paths:
/.well-known/jwks.json:
get:
description: JWKS Endpoint
produces:
- application/json
responses:
"200":
description: OK
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/controller.SimpleResponse'
summary: JWKS
tags:
- well-known
/.well-known/openid-configuration:
get:
description: OpenID Connect Configuration Discovery Endpoint
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/controller.OpenIDConnectConfiguration'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/controller.SimpleResponse'
summary: OpenID Connect Configuration
tags:
- well-known
/.well-known/webfinger:
get:
description: WebFinger Endpoint
parameters:
- description: Resource
in: query
name: resource
required: true
type: string
- description: Rel
in: query
name: rel
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/controller.WebfingerResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/controller.SimpleResponse'
summary: WebFinger
tags:
- well-known
/api/auth/caddy:
get:
description: Forward-Auth Proxy Endpoint
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/controller.SimpleResponse'
"302":
description: Found
"400":
description: Bad Request
schema:
$ref: '#/definitions/controller.SimpleResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/controller.SimpleResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/controller.SimpleResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/controller.SimpleResponse'
summary: Proxy
tags:
- forward-auth
/api/auth/envoy:
delete:
description: Forward-Auth Proxy Endpoint
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/controller.SimpleResponse'
"302":
description: Found
"400":
description: Bad Request
schema:
$ref: '#/definitions/controller.SimpleResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/controller.SimpleResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/controller.SimpleResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/controller.SimpleResponse'
summary: Proxy
tags:
- forward-auth
get:
description: Forward-Auth Proxy Endpoint
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/controller.SimpleResponse'
"302":
description: Found
"400":
description: Bad Request
schema:
$ref: '#/definitions/controller.SimpleResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/controller.SimpleResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/controller.SimpleResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/controller.SimpleResponse'
summary: Proxy
tags:
- forward-auth
head:
description: Forward-Auth Proxy Endpoint
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/controller.SimpleResponse'
"302":
description: Found
"400":
description: Bad Request
schema:
$ref: '#/definitions/controller.SimpleResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/controller.SimpleResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/controller.SimpleResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/controller.SimpleResponse'
summary: Proxy
tags:
- forward-auth
options:
description: Forward-Auth Proxy Endpoint
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/controller.SimpleResponse'
"302":
description: Found
"400":
description: Bad Request
schema:
$ref: '#/definitions/controller.SimpleResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/controller.SimpleResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/controller.SimpleResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/controller.SimpleResponse'
summary: Proxy
tags:
- forward-auth
patch:
description: Forward-Auth Proxy Endpoint
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/controller.SimpleResponse'
"302":
description: Found
"400":
description: Bad Request
schema:
$ref: '#/definitions/controller.SimpleResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/controller.SimpleResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/controller.SimpleResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/controller.SimpleResponse'
summary: Proxy
tags:
- forward-auth
post:
description: Forward-Auth Proxy Endpoint
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/controller.SimpleResponse'
"302":
description: Found
"400":
description: Bad Request
schema:
$ref: '#/definitions/controller.SimpleResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/controller.SimpleResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/controller.SimpleResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/controller.SimpleResponse'
summary: Proxy
tags:
- forward-auth
put:
description: Forward-Auth Proxy Endpoint
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/controller.SimpleResponse'
"302":
description: Found
"400":
description: Bad Request
schema:
$ref: '#/definitions/controller.SimpleResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/controller.SimpleResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/controller.SimpleResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/controller.SimpleResponse'
summary: Proxy
tags:
- forward-auth
/api/auth/nginx:
get:
description: Forward-Auth Proxy Endpoint
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/controller.SimpleResponse'
"302":
description: Found
"400":
description: Bad Request
schema:
$ref: '#/definitions/controller.SimpleResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/controller.SimpleResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/controller.SimpleResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/controller.SimpleResponse'
summary: Proxy
tags:
- forward-auth
/api/auth/traefik:
get:
description: Forward-Auth Proxy Endpoint
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/controller.SimpleResponse'
"302":
description: Found
"400":
description: Bad Request
schema:
$ref: '#/definitions/controller.SimpleResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/controller.SimpleResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/controller.SimpleResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/controller.SimpleResponse'
summary: Proxy
tags:
- forward-auth
/api/context/app:
get:
description: Get the app context
@@ -358,6 +795,108 @@ paths:
summary: Authorize Complete
tags:
- oidc
/api/user/login:
post:
consumes:
- application/json
description: Login Endpoint
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/controller.TotpPendingResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/controller.SimpleResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/controller.SimpleResponse'
"429":
description: Too Many Requests
schema:
$ref: '#/definitions/controller.SimpleResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/controller.SimpleResponse'
summary: Login
tags:
- accounts
/api/user/logout:
post:
description: Logout Endpoint
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/controller.SimpleResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/controller.SimpleResponse'
summary: Logout
tags:
- accounts
/api/user/tailscale:
post:
consumes:
- application/json
description: Tailscale Auth Endpoint (Experimental)
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/controller.SimpleResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/controller.SimpleResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/controller.SimpleResponse'
summary: Tailscale
tags:
- accounts
/api/user/totp:
post:
consumes:
- application/json
description: TOTP Endpoint
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/controller.SimpleResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/controller.SimpleResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/controller.SimpleResponse'
"429":
description: Too Many Requests
schema:
$ref: '#/definitions/controller.SimpleResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/controller.SimpleResponse'
summary: TOTP
tags:
- accounts
/authorize:
get:
consumes:
@@ -687,4 +1226,27 @@ paths:
summary: Userinfo
tags:
- oidc
/resources/{resource}:
get:
description: Get a resource by file name
parameters:
- description: Resource Name
in: path
name: resource
required: true
type: string
responses:
"200":
description: OK
"403":
description: Forbidden
schema:
$ref: '#/definitions/controller.SimpleResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/controller.SimpleResponse'
summary: Resources Endpoint
tags:
- resources
swagger: "2.0"