This commit is contained in:
ljw
2024-10-30 15:46:12 +08:00
parent eada376783
commit 0ddfbdbd23
9 changed files with 66 additions and 26 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ func main() {
} }
func DatabaseAutoUpdate() { func DatabaseAutoUpdate() {
version := 242 version := 243
db := global.DB db := global.DB
+15
View File
@@ -3164,11 +3164,17 @@ const docTemplateadmin = `{
"id": { "id": {
"type": "integer" "type": "integer"
}, },
"issuer": {
"type": "string"
},
"op": { "op": {
"type": "string" "type": "string"
}, },
"redirect_url": { "redirect_url": {
"type": "string" "type": "string"
},
"scopes": {
"type": "string"
} }
} }
}, },
@@ -3749,12 +3755,18 @@ const docTemplateadmin = `{
"id": { "id": {
"type": "integer" "type": "integer"
}, },
"issuer": {
"type": "string"
},
"op": { "op": {
"type": "string" "type": "string"
}, },
"redirect_url": { "redirect_url": {
"type": "string" "type": "string"
}, },
"scopes": {
"type": "string"
},
"updated_at": { "updated_at": {
"type": "string" "type": "string"
} }
@@ -3795,6 +3807,9 @@ const docTemplateadmin = `{
"id": { "id": {
"type": "string" "type": "string"
}, },
"last_online_ip": {
"type": "string"
},
"last_online_time": { "last_online_time": {
"type": "integer" "type": "integer"
}, },
+15
View File
@@ -3157,11 +3157,17 @@
"id": { "id": {
"type": "integer" "type": "integer"
}, },
"issuer": {
"type": "string"
},
"op": { "op": {
"type": "string" "type": "string"
}, },
"redirect_url": { "redirect_url": {
"type": "string" "type": "string"
},
"scopes": {
"type": "string"
} }
} }
}, },
@@ -3742,12 +3748,18 @@
"id": { "id": {
"type": "integer" "type": "integer"
}, },
"issuer": {
"type": "string"
},
"op": { "op": {
"type": "string" "type": "string"
}, },
"redirect_url": { "redirect_url": {
"type": "string" "type": "string"
}, },
"scopes": {
"type": "string"
},
"updated_at": { "updated_at": {
"type": "string" "type": "string"
} }
@@ -3788,6 +3800,9 @@
"id": { "id": {
"type": "string" "type": "string"
}, },
"last_online_ip": {
"type": "string"
},
"last_online_time": { "last_online_time": {
"type": "integer" "type": "integer"
}, },
+10
View File
@@ -105,10 +105,14 @@ definitions:
type: string type: string
id: id:
type: integer type: integer
issuer:
type: string
op: op:
type: string type: string
redirect_url: redirect_url:
type: string type: string
scopes:
type: string
required: required:
- client_id - client_id
- client_secret - client_secret
@@ -500,10 +504,14 @@ definitions:
type: string type: string
id: id:
type: integer type: integer
issuer:
type: string
op: op:
type: string type: string
redirect_url: redirect_url:
type: string type: string
scopes:
type: string
updated_at: updated_at:
type: string type: string
type: object type: object
@@ -530,6 +538,8 @@ definitions:
type: string type: string
id: id:
type: string type: string
last_online_ip:
type: string
last_online_time: last_online_time:
type: integer type: integer
memory: memory:
+1 -1
View File
@@ -834,7 +834,7 @@ const docTemplateapi = `{
} }
}, },
"/login-options": { "/login-options": {
"post": { "get": {
"description": "登录选项", "description": "登录选项",
"consumes": [ "consumes": [
"application/json" "application/json"
+1 -1
View File
@@ -827,7 +827,7 @@
} }
}, },
"/login-options": { "/login-options": {
"post": { "get": {
"description": "登录选项", "description": "登录选项",
"consumes": [ "consumes": [
"application/json" "application/json"
+1 -1
View File
@@ -715,7 +715,7 @@ paths:
tags: tags:
- 登录 - 登录
/login-options: /login-options:
post: get:
consumes: consumes:
- application/json - application/json
description: 登录选项 description: 登录选项
+1 -1
View File
@@ -81,7 +81,7 @@ func (l *Login) Login(c *gin.Context) {
// @Produce json // @Produce json
// @Success 200 {object} []string // @Success 200 {object} []string
// @Failure 500 {object} response.ErrorResponse // @Failure 500 {object} response.ErrorResponse
// @Router /login-options [post] // @Router /login-options [get]
func (l *Login) LoginOptions(c *gin.Context) { func (l *Login) LoginOptions(c *gin.Context) {
oauthOks := []string{} oauthOks := []string{}
err, _ := service.AllService.OauthService.GetOauthConfig(model.OauthTypeGithub) err, _ := service.AllService.OauthService.GetOauthConfig(model.OauthTypeGithub)
+1 -1
View File
@@ -15,9 +15,9 @@ import (
"net/http" "net/http"
"net/url" "net/url"
"strconv" "strconv"
"strings"
"sync" "sync"
"time" "time"
"strings"
) )
// Define a struct to parse the .well-known/openid-configuration response // Define a struct to parse the .well-known/openid-configuration response