move to jwt tokens
This commit is contained in:
73
docs/docs.go
73
docs/docs.go
@@ -89,6 +89,38 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/token/generateTokenHandler": {
|
||||
"get": {
|
||||
"description": "Gets the PSU Data from unraid",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"text/plain"
|
||||
],
|
||||
"tags": [
|
||||
"token"
|
||||
],
|
||||
"summary": "Generate JWT Token",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Secret Token",
|
||||
"name": "token",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "response",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/unraid/powerusage": {
|
||||
"get": {
|
||||
"description": "Gets the PSU Data from unraid",
|
||||
@@ -115,50 +147,9 @@ const docTemplate = `{
|
||||
},
|
||||
"securityDefinitions": {
|
||||
"ApiKeyAuth": {
|
||||
"description": "Description for what is this security definition being used",
|
||||
"type": "apiKey",
|
||||
"name": "Authorization",
|
||||
"in": "header"
|
||||
},
|
||||
"BasicAuth": {
|
||||
"type": "basic"
|
||||
},
|
||||
"OAuth2AccessCode": {
|
||||
"type": "oauth2",
|
||||
"flow": "accessCode",
|
||||
"authorizationUrl": "https://example.com/oauth/authorize",
|
||||
"tokenUrl": "https://example.com/oauth/token",
|
||||
"scopes": {
|
||||
"admin": "\t\t\t\t\t\t\tGrants read and write access to administrative information"
|
||||
}
|
||||
},
|
||||
"OAuth2Application": {
|
||||
"type": "oauth2",
|
||||
"flow": "application",
|
||||
"tokenUrl": "https://example.com/oauth/token",
|
||||
"scopes": {
|
||||
"admin": "\t\t\t\t\t\t\tGrants read and write access to administrative information",
|
||||
"write": "\t\t\t\t\t\t\tGrants write access"
|
||||
}
|
||||
},
|
||||
"OAuth2Implicit": {
|
||||
"type": "oauth2",
|
||||
"flow": "implicit",
|
||||
"authorizationUrl": "https://example.com/oauth/authorize",
|
||||
"scopes": {
|
||||
"admin": "\t\t\t\t\t\t\tGrants read and write access to administrative information",
|
||||
"write": "\t\t\t\t\t\t\tGrants write access"
|
||||
}
|
||||
},
|
||||
"OAuth2Password": {
|
||||
"type": "oauth2",
|
||||
"flow": "password",
|
||||
"tokenUrl": "https://example.com/oauth/token",
|
||||
"scopes": {
|
||||
"admin": "\t\t\t\t\t\t\tGrants read and write access to administrative information",
|
||||
"read": "\t\t\t\t\t\t\t\tGrants read access",
|
||||
"write": "\t\t\t\t\t\t\tGrants write access"
|
||||
}
|
||||
}
|
||||
}
|
||||
}`
|
||||
|
||||
@@ -82,6 +82,38 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/token/generateTokenHandler": {
|
||||
"get": {
|
||||
"description": "Gets the PSU Data from unraid",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"text/plain"
|
||||
],
|
||||
"tags": [
|
||||
"token"
|
||||
],
|
||||
"summary": "Generate JWT Token",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Secret Token",
|
||||
"name": "token",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "response",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/unraid/powerusage": {
|
||||
"get": {
|
||||
"description": "Gets the PSU Data from unraid",
|
||||
@@ -108,50 +140,9 @@
|
||||
},
|
||||
"securityDefinitions": {
|
||||
"ApiKeyAuth": {
|
||||
"description": "Description for what is this security definition being used",
|
||||
"type": "apiKey",
|
||||
"name": "Authorization",
|
||||
"in": "header"
|
||||
},
|
||||
"BasicAuth": {
|
||||
"type": "basic"
|
||||
},
|
||||
"OAuth2AccessCode": {
|
||||
"type": "oauth2",
|
||||
"flow": "accessCode",
|
||||
"authorizationUrl": "https://example.com/oauth/authorize",
|
||||
"tokenUrl": "https://example.com/oauth/token",
|
||||
"scopes": {
|
||||
"admin": "\t\t\t\t\t\t\tGrants read and write access to administrative information"
|
||||
}
|
||||
},
|
||||
"OAuth2Application": {
|
||||
"type": "oauth2",
|
||||
"flow": "application",
|
||||
"tokenUrl": "https://example.com/oauth/token",
|
||||
"scopes": {
|
||||
"admin": "\t\t\t\t\t\t\tGrants read and write access to administrative information",
|
||||
"write": "\t\t\t\t\t\t\tGrants write access"
|
||||
}
|
||||
},
|
||||
"OAuth2Implicit": {
|
||||
"type": "oauth2",
|
||||
"flow": "implicit",
|
||||
"authorizationUrl": "https://example.com/oauth/authorize",
|
||||
"scopes": {
|
||||
"admin": "\t\t\t\t\t\t\tGrants read and write access to administrative information",
|
||||
"write": "\t\t\t\t\t\t\tGrants write access"
|
||||
}
|
||||
},
|
||||
"OAuth2Password": {
|
||||
"type": "oauth2",
|
||||
"flow": "password",
|
||||
"tokenUrl": "https://example.com/oauth/token",
|
||||
"scopes": {
|
||||
"admin": "\t\t\t\t\t\t\tGrants read and write access to administrative information",
|
||||
"read": "\t\t\t\t\t\t\t\tGrants read access",
|
||||
"write": "\t\t\t\t\t\t\tGrants write access"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -55,6 +55,27 @@ paths:
|
||||
summary: Travel Agent ChatGPT
|
||||
tags:
|
||||
- openai
|
||||
/token/generateTokenHandler:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Gets the PSU Data from unraid
|
||||
parameters:
|
||||
- description: Secret Token
|
||||
in: query
|
||||
name: token
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- text/plain
|
||||
responses:
|
||||
"200":
|
||||
description: response
|
||||
schema:
|
||||
type: string
|
||||
summary: Generate JWT Token
|
||||
tags:
|
||||
- token
|
||||
/unraid/powerusage:
|
||||
get:
|
||||
consumes:
|
||||
@@ -72,39 +93,7 @@ paths:
|
||||
- unraid
|
||||
securityDefinitions:
|
||||
ApiKeyAuth:
|
||||
description: Description for what is this security definition being used
|
||||
in: header
|
||||
name: Authorization
|
||||
type: apiKey
|
||||
BasicAuth:
|
||||
type: basic
|
||||
OAuth2AccessCode:
|
||||
authorizationUrl: https://example.com/oauth/authorize
|
||||
flow: accessCode
|
||||
scopes:
|
||||
admin: "\t\t\t\t\t\t\tGrants read and write access to administrative information"
|
||||
tokenUrl: https://example.com/oauth/token
|
||||
type: oauth2
|
||||
OAuth2Application:
|
||||
flow: application
|
||||
scopes:
|
||||
admin: "\t\t\t\t\t\t\tGrants read and write access to administrative information"
|
||||
write: "\t\t\t\t\t\t\tGrants write access"
|
||||
tokenUrl: https://example.com/oauth/token
|
||||
type: oauth2
|
||||
OAuth2Implicit:
|
||||
authorizationUrl: https://example.com/oauth/authorize
|
||||
flow: implicit
|
||||
scopes:
|
||||
admin: "\t\t\t\t\t\t\tGrants read and write access to administrative information"
|
||||
write: "\t\t\t\t\t\t\tGrants write access"
|
||||
type: oauth2
|
||||
OAuth2Password:
|
||||
flow: password
|
||||
scopes:
|
||||
admin: "\t\t\t\t\t\t\tGrants read and write access to administrative information"
|
||||
read: "\t\t\t\t\t\t\t\tGrants read access"
|
||||
write: "\t\t\t\t\t\t\tGrants write access"
|
||||
tokenUrl: https://example.com/oauth/token
|
||||
type: oauth2
|
||||
swagger: "2.0"
|
||||
|
||||
Reference in New Issue
Block a user