完善登录逻辑,登录接口统一到 /token
This commit is contained in:
@@ -85,10 +85,19 @@ func (s *authService) OauthRefreshToken(ctx context.Context, client *models.Clie
|
||||
return details, nil
|
||||
}
|
||||
|
||||
type GrantType int
|
||||
type OauthGrantType string
|
||||
|
||||
const (
|
||||
GrantTypeAuthorizationCode GrantType = iota
|
||||
GrantTypeClientCredentials
|
||||
GrantTypeRefreshToken
|
||||
OauthGrantTypeAuthorizationCode = OauthGrantType("authorization_code")
|
||||
OauthGrantTypeClientCredentials = OauthGrantType("client_credentials")
|
||||
OauthGrantTypeRefreshToken = OauthGrantType("refresh_token")
|
||||
OauthGrantTypePassword = OauthGrantType("password")
|
||||
)
|
||||
|
||||
type OauthGrantLoginType string
|
||||
|
||||
const (
|
||||
OauthGrantPasswordTypePassword = OauthGrantLoginType("password")
|
||||
OauthGrantPasswordTypePhoneCode = OauthGrantLoginType("phone_code")
|
||||
OauthGrantPasswordTypeEmailCode = OauthGrantLoginType("email_code")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user