AuthN: move oauth token hook into session client (#76688)

* Move rotate logic into its own function

* Move oauth token sync to session client

* Add user to the local cache if refresh tokens are not enabled for the provider so we can skip the check in other
requests
This commit is contained in:
Karl Persson
2023-10-18 12:51:15 +02:00
committed by GitHub
parent 8b16f2aca8
commit 455cede699
6 changed files with 425 additions and 458 deletions
@@ -394,4 +394,5 @@ func syncSignedInUserToIdentity(usr *user.SignedInUser, identity *authn.Identity
identity.LastSeenAt = usr.LastSeenAt
identity.IsDisabled = usr.IsDisabled
identity.IsGrafanaAdmin = &usr.IsGrafanaAdmin
identity.AuthenticatedBy = usr.AuthenticatedBy
}