提交代理配置结果到长效网关
This commit is contained in:
@@ -19,7 +19,6 @@ type authService struct{}
|
||||
|
||||
// OauthAuthorizationCode 验证授权码
|
||||
func (s *authService) OauthAuthorizationCode(ctx context.Context, client *m.Client, code, redirectURI, codeVerifier string) (*auth2.TokenDetails, error) {
|
||||
// TODO: 从数据库验证授权码
|
||||
return nil, errors.New("TODO")
|
||||
}
|
||||
|
||||
@@ -43,7 +42,6 @@ func (s *authService) OauthClientCredentials(ctx context.Context, client *m.Clie
|
||||
},
|
||||
}
|
||||
|
||||
// todo 数据库定义会话持续时间
|
||||
token, err := auth2.CreateSession(ctx, &authCtx, false)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -54,7 +52,6 @@ func (s *authService) OauthClientCredentials(ctx context.Context, client *m.Clie
|
||||
|
||||
// OauthRefreshToken 验证刷新令牌
|
||||
func (s *authService) OauthRefreshToken(ctx context.Context, _ *m.Client, refreshToken string, scope ...[]string) (*auth2.TokenDetails, error) {
|
||||
// TODO: 从数据库验证刷新令牌
|
||||
details, err := auth2.RefreshSession(ctx, refreshToken, true)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user