mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 03:41:01 +00:00
fix bitbucket SSO using UUID from bitbucket api response as ForgeRemoteID (#3265)
This commit is contained in:
parent
1c3159ebb7
commit
8cb86ddc68
3 changed files with 3 additions and 2 deletions
|
@ -137,7 +137,7 @@ func convertUser(from *internal.Account, token *oauth2.Token) *model.User {
|
|||
Secret: token.RefreshToken,
|
||||
Expiry: token.Expiry.UTC().Unix(),
|
||||
Avatar: from.Links.Avatar.Href,
|
||||
ForgeRemoteID: model.ForgeRemoteID(fmt.Sprint(from.ID)),
|
||||
ForgeRemoteID: model.ForgeRemoteID(fmt.Sprint(from.UUID)),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -300,6 +300,7 @@ const pullRequestsPayload = `
|
|||
|
||||
const userPayload = `
|
||||
{
|
||||
"uuid": "{4d8c0f46-cd62-4b77-b0cf-faa3e4d932c6}",
|
||||
"username": "superman",
|
||||
"links": {
|
||||
"avatar": {
|
||||
|
|
|
@ -21,7 +21,7 @@ import (
|
|||
)
|
||||
|
||||
type Account struct {
|
||||
ID int64 `json:"id"`
|
||||
UUID string `json:"uuid"`
|
||||
Login string `json:"username"`
|
||||
Name string `json:"display_name"`
|
||||
Type string `json:"type"`
|
||||
|
|
Loading…
Reference in a new issue