AuthN: fetch final state of signed in user (#62854)

* AuthN: add a hook we can use to fetch final state of user
This commit is contained in:
Karl Persson
2023-02-03 14:14:38 +01:00
committed by GitHub
parent 29212c9a3f
commit 180a587f70
12 changed files with 112 additions and 9 deletions

View File

@@ -69,11 +69,9 @@ func (s *JWT) Authenticate(ctx context.Context, r *authn.Request) (*authn.Identi
AuthID: sub,
OrgRoles: map[int64]org.RoleType{},
ClientParams: authn.ClientParams{
SyncUser: true,
// We do not allow team member sync from JWT Authentication
SyncTeamMembers: false,
AllowSignUp: s.cfg.JWTAuthAutoSignUp,
EnableDisabledUsers: false,
SyncUser: true,
FetchSyncedUser: true,
AllowSignUp: s.cfg.JWTAuthAutoSignUp,
}}
if key := s.cfg.JWTAuthUsernameClaim; key != "" {