Skip to content

Commit

Permalink
fix(engine): gitlab user auth with custom endpoint (#5006)
Browse files Browse the repository at this point in the history
* #5005 Fix gitlab user auth with custom endpoint

close #5008

Signed-off-by: Louis GOUNOT <[email protected]>
  • Loading branch information
louis-gounot authored Feb 26, 2020
1 parent bd4fa61 commit f30e8f0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions engine/api/authentication/gitlab/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ func (d authDriver) GetUserInfo(ctx context.Context, req sdk.AuthConsumerSigninR
}

c := gitlab.NewOAuthClient(http.DefaultClient, t.AccessToken)
if err := c.SetBaseURL(d.url); err != nil {
return info, sdk.WrapError(err, "invalid gitlab url")
}
me, res, err := c.Users.CurrentUser()
if err != nil {
return info, sdk.WrapError(err, "cannot get current user from gitlab")
Expand Down

0 comments on commit f30e8f0

Please sign in to comment.