Skip to content

Commit d6ee006

Browse files
committed
fix verify pwd client id
1 parent f893a91 commit d6ee006

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

func.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type GenerateCodeFunc func(ctx context.Context, clientID, openID, redirectURI st
2626
type VerifyCodeFunc func(ctx context.Context, code, clientID, redirectURI string) (value *CodeValue, err error)
2727

2828
// VerifyPasswordFunc 验证账号密码委托
29-
type VerifyPasswordFunc func(ctx context.Context, username, password string) (openID string, err error)
29+
type VerifyPasswordFunc func(ctx context.Context, clientID, username, password string) (openID string, err error)
3030

3131
// VerifyScopeFunc 验证范围委托
3232
type VerifyScopeFunc func(ctx context.Context, scope []string, clientID string) (err error)

server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ func (srv *Server) authorizeDeviceCode(ctx context.Context, clientID, scope stri
416416
// 密码式(password)
417417
func (srv *Server) tokenResourceOwnerPasswordCredentials(ctx context.Context, client *ClientBasic, username, password, scope string) (token *TokenResponse, err error) {
418418
var openID string
419-
openID, err = srv.VerifyPassword(ctx, username, password)
419+
openID, err = srv.VerifyPassword(ctx, client.ID, username, password)
420420
if err != nil {
421421
return
422422
}

0 commit comments

Comments
 (0)