Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use global endpoint to retrieve Konnect org info #845

Merged
merged 1 commit into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Table of Contents

- [v1.18.1](#v1181)
- [v1.18.0](#v1180)
- [v1.17.3](#v1173)
- [v1.17.2](#v1172)
Expand Down Expand Up @@ -52,6 +53,15 @@
- [v0.2.0](#v020)
- [v0.1.0](#v010)

## [v1.18.1]

> Release date: 2023/02/10

### Fix

- Use global endpoint to retrieve Konnect Organization info.
[#844](https://github.com/Kong/deck/pull/844)

## [v1.18.0]

> Release date: 2023/02/09
Expand Down Expand Up @@ -1153,6 +1163,7 @@ No breaking changes have been introduced in this release.

Debut release of decK

[v1.18.1]: https://github.com/kong/deck/compare/v1.18.0...v1.18.1
[v1.18.0]: https://github.com/kong/deck/compare/v1.17.3...v1.18.0
[v1.17.3]: https://github.com/kong/deck/compare/v1.17.2...v1.17.3
[v1.17.2]: https://github.com/kong/deck/compare/v1.17.1...v1.17.2
Expand Down
7 changes: 5 additions & 2 deletions konnect/login_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,11 @@ func (s *AuthService) LoginV2(ctx context.Context, email,
}

func (s *AuthService) OrgUserInfo(ctx context.Context) (*OrgUserInfo, error) {
method := http.MethodGet
req, err := s.client.NewRequest(method, "/v2/organizations/me", nil, nil)
// replace geo-specific endpoint with global one for retrieving org info
client := *s.client
client.baseURL = strings.Replace(s.client.baseURL, "eu.", "global.", 1)

req, err := client.NewRequest(http.MethodGet, "/v2/organizations/me", nil, nil)
if err != nil {
return nil, err
}
Expand Down