Skip to content

Commit

Permalink
fixes in auth provider
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgigi96 committed Feb 13, 2024
1 parent c2b7d8a commit e33ee9a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/grpc/services/gateway/authprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (s *svc) Authenticate(ctx context.Context, req *gateway.AuthenticateRequest
}, nil
}

u := *res.User
u := res.User
if sharedconf.SkipUserGroupsInToken() {
u.Groups = []string{}
}
Expand All @@ -102,7 +102,7 @@ func (s *svc) Authenticate(ctx context.Context, req *gateway.AuthenticateRequest
// the resources referenced by these. Since the current scope can do that,
// mint a temporary token based on that and expand the scope. Then set the
// token obtained from the updated scope in the context.
token, err := s.tokenmgr.MintToken(ctx, &u, res.TokenScope)
token, err := s.tokenmgr.MintToken(ctx, u, res.TokenScope)
if err != nil {
err = errors.Wrap(err, "authsvc: error in MintToken")
res := &gateway.AuthenticateResponse{
Expand All @@ -127,7 +127,7 @@ func (s *svc) Authenticate(ctx context.Context, req *gateway.AuthenticateRequest
*/
scope := res.TokenScope

token, err = s.tokenmgr.MintToken(ctx, &u, scope)
token, err = s.tokenmgr.MintToken(ctx, u, scope)
if err != nil {
err = errors.Wrap(err, "authsvc: error in MintToken")
res := &gateway.AuthenticateResponse{
Expand Down

0 comments on commit e33ee9a

Please sign in to comment.