1 Star 0 Fork 0

carlmax_my/console-core-go

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
login.go 2.20 KB
Copy Edit Raw Blame History
carlmax_my authored 2024-12-02 21:32 . init project
package authing_model
var (
LoginTabPassword = "password"
LoginTabCode = "phone-code"
PasswordMethods = []string{"phone-password", "email-password", "username-password"}
VerifyCodeMethods = []string{"phone-code", "email-code"}
)
// DefaultLoginTab = "password", "phone-code"
// passwordMethods = "phone-password", "email-password", "username-password"
// codeMethods = phone-code, email-code
type MyAuthingLoginConfig struct {
DefaultCodeVerifyLoginTab bool
EnablePasswordLogin bool
EnableCodeVerifyLogin bool
}
type LoginTabConfigReq struct {
EnabledLoginMethods []string `json:"enabledLoginMethods"`
ValidLoginMethods []string `json:"validLoginMethods"`
ValidRegisterMethods []string `json:"validRegisterMethods"`
}
type LoginPageUpdateReq struct {
CustomSecurityEnabled bool `json:"customSecurityEnabled"`
AutoRegisterThenLogin bool `json:"autoRegisterThenLogin"` // this will trigger auto add user when user not exist
RegisterTabs []string `json:"registerTabs"` //
DefaultLoginTab string `json:"defaultLoginTab"` // phone-code, password
LoginTabs []string `json:"loginTabs"`
PasswordTabConfig LoginTabConfigReq `json:"passwordTabConfig"` // phone-password,email-password,username-password
VerifyCodeTabConfig LoginTabConfigReq `json:"verifyCodeTabConfig"` // phone-code, email-code
OidcConfig AppOIDCConfig `json:"oidcConfig"`
}
type AppOIDCConfig struct {
Display_prompt_page bool `json:"display_prompt_page"` // true
Id_token_signed_response_alg string `json:"id_token_signed_response_alg"` // HS256 RS256
Grant_types []string `json:"grant_types"` // "authorization_code", "refresh_token"
Response_types []string `json:"response_types"` // id_token
Introspection_endpoint_auth_method string `json:"introspection_endpoint_auth_method"` // client_secret_post
Revocation_endpoint_auth_method string `json:"revocation_endpoint_auth_method"` // client_secret_post
Token_endpoint_auth_method string `json:"token_endpoint_auth_method"` // none
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/carlmax_my/console-core-go.git
git@gitee.com:carlmax_my/console-core-go.git
carlmax_my
console-core-go
console-core-go
v0.0.47

Search