AuthN: JWT remove unnecessary if (#62233)

remove unnecessary if
This commit is contained in:
Jo 2023-01-26 17:32:20 +01:00 committed by GitHub
parent 5050822b9a
commit 284ca4eab4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,7 +71,7 @@ func (s *JWT) Authenticate(ctx context.Context, r *authn.Request) (*authn.Identi
ClientParams: authn.ClientParams{
SyncUser: true,
SyncTeamMembers: true,
AllowSignUp: false,
AllowSignUp: s.cfg.JWTAuthAutoSignUp,
EnableDisabledUsers: false,
}}
@ -125,10 +125,6 @@ func (s *JWT) Authenticate(ctx context.Context, r *authn.Request) (*authn.Identi
return nil, ErrJWTMissingClaim.Errorf("missing login and email claim in JWT")
}
if s.cfg.JWTAuthAutoSignUp {
id.ClientParams.AllowSignUp = true
}
return id, nil
}