Skip to content

Commit bfe8b18

Browse files
authoredMay 14, 2024
Merge pull request #405 from IBM-Cloud/dev
Promote 1.4.0 to master
2 parents dd20f56 + 72058f3 commit bfe8b18

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+271
-6724
lines changed
 

‎.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: go
22
dist: focal
33
go:
4-
- '1.21.x'
4+
- '1.22.x'
55
addons:
66
apt:
77
packages:

‎bluemix/authentication/iam/iam.go

+6-22
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@ import (
1414
)
1515

1616
const (
17-
defaultClientID = "bx"
18-
defaultClientSecret = "bx"
19-
defaultUAAClientID = "cf"
20-
defaultUAAClientSecret = ""
21-
crTokenParam = "cr_token"
22-
profileIDParam = "profile_id"
23-
profileNameParam = "profile_name"
24-
profileCRNParam = "profile_crn"
17+
defaultClientID = "bx"
18+
defaultClientSecret = "bx"
19+
crTokenParam = "cr_token"
20+
profileIDParam = "profile_id"
21+
profileNameParam = "profile_name"
22+
profileCRNParam = "profile_crn"
2523
)
2624

2725
// Grant types
@@ -40,7 +38,6 @@ const (
4038
// Response types
4139
const (
4240
ResponseTypeIAM authentication.ResponseType = "cloud_iam"
43-
ResponseTypeUAA authentication.ResponseType = "uaa"
4441
ResponseTypeIMS authentication.ResponseType = "ims_portal"
4542
ResponseTypeDelegatedRefreshToken authentication.ResponseType = "delegated_refresh_token" // #nosec G101 - this the API response grant type. Not a credential
4643
)
@@ -191,10 +188,6 @@ type Token struct {
191188
Scope string `json:"scope"`
192189
Expiry time.Time `json:"expiration"`
193190

194-
// Fields present when ResponseTypeUAA is set
195-
UAAToken string `json:"uaa_token"`
196-
UAARefreshToken string `json:"uaa_refresh_token"`
197-
198191
// Fields present when ResponseTypeIMS is set
199192
IMSUserID int64 `json:"ims_user_id"`
200193
IMSToken string `json:"ims_token"`
@@ -263,8 +256,6 @@ func DefaultConfig(iamEndpoint string) Config {
263256
SessionEndpoint: iamEndpoint + "/v1/sessions",
264257
ClientID: defaultClientID,
265258
ClientSecret: defaultClientSecret,
266-
UAAClientID: defaultUAAClientID,
267-
UAAClientSecret: defaultUAAClientSecret,
268259
}
269260
}
270261

@@ -285,13 +276,6 @@ func (c *client) GetToken(tokenReq *authentication.TokenRequest) (*Token, error)
285276
tokenReq.SetValue(v)
286277

287278
responseTypes := tokenReq.ResponseTypes()
288-
for _, t := range responseTypes {
289-
if t == ResponseTypeUAA {
290-
v.Set("uaa_client_id", c.config.UAAClientID)
291-
v.Set("uaa_client_secret", c.config.UAAClientSecret)
292-
break
293-
}
294-
}
295279
if len(responseTypes) == 0 {
296280
v.Set("response_type", ResponseTypeIAM.String())
297281
}

0 commit comments

Comments
 (0)
Failed to load comments.