Skip to content

Commit

Permalink
Update selfservice/strategy/oidc/provider_gitlab.go
Browse files Browse the repository at this point in the history
Co-authored-by: hackerman <3372410+aeneasr@users.noreply.github.com>
  • Loading branch information
perryao and aeneasr committed Jun 26, 2020
1 parent e28c80e commit 8db9ebe
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions selfservice/strategy/oidc/provider_gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,8 @@ func (g *ProviderGitLab) Claims(ctx context.Context, exchange *oauth2.Token) (*C
}
defer resp.Body.Close()

body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return nil, errors.WithStack(herodot.ErrInternalServerError.WithReasonf("%s", err))
}

var claims Claims
err = json.Unmarshal(body, &claims)
if err != nil {
if err := json.NewDecoder(resp.Body).Decode(&claims); err != nil {
return nil, errors.WithStack(herodot.ErrInternalServerError.WithReasonf("%s", err))
}

Expand Down

0 comments on commit 8db9ebe

Please sign in to comment.