mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 00:42:16 +08:00
OAuth: Use the attached external session data in OAuthToken and OAuthTokenSync (#96655)
* wip * wip + tests * wip * wip opt2 * Use authn.Identity struct's SessionToken * Merge fixes * Handle disabling the feature flag correctly * Fix test * Cleanup * Remove HasOAuthEntry from the OAuthTokenService interface * Remove unused function
This commit is contained in:
@ -50,7 +50,7 @@ func (m *OAuthTokenMiddleware) applyToken(ctx context.Context, pCtx backend.Plug
|
||||
}
|
||||
|
||||
if m.oAuthTokenService.IsOAuthPassThruEnabled(ds) {
|
||||
if token := m.oAuthTokenService.GetCurrentOAuthToken(ctx, reqCtx.SignedInUser); token != nil {
|
||||
if token := m.oAuthTokenService.GetCurrentOAuthToken(ctx, reqCtx.SignedInUser, reqCtx.UserToken); token != nil {
|
||||
authorizationHeader := fmt.Sprintf("%s %s", token.Type(), token.AccessToken)
|
||||
idTokenHeader := ""
|
||||
|
||||
|
Reference in New Issue
Block a user