Skip to content

Commit 06f5cb3

Browse files
committed
Initialize TokenInfo before invoking AccessGenerate.Token
Use the same code from this commit a305d01 Fixes #51
1 parent 196a023 commit 06f5cb3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

manage/manager.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,11 @@ func (m *Manager) GenerateAccessToken(gt oauth2.GrantType, tgr *oauth2.TokenGene
293293
}
294294
_, ierr := m.injector.Invoke(func(ti oauth2.TokenInfo, gen oauth2.AccessGenerate, stor oauth2.TokenStore) {
295295
ti = ti.New()
296+
ti.SetClientID(tgr.ClientID)
297+
ti.SetUserID(tgr.UserID)
298+
ti.SetRedirectURI(tgr.RedirectURI)
299+
ti.SetScope(tgr.Scope)
300+
296301
td := &oauth2.GenerateBasic{
297302
Client: cli,
298303
UserID: tgr.UserID,

0 commit comments

Comments
 (0)