File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
bluemix/configuration/core_config Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -313,18 +313,18 @@ func (c *bxConfig) IAMID() (guid string) {
313
313
func (c * bxConfig ) IsLoggedIn () bool {
314
314
if token , refresh := c .IAMToken (), c .IAMRefreshToken (); token != "" || refresh != "" {
315
315
iamTokenInfo := NewIAMTokenInfo (token )
316
- if iamTokenInfo .hasExpired () && refresh != "" {
316
+ if iamTokenInfo .HasExpired () && refresh != "" {
317
317
repo := newRepository (c )
318
318
if _ , err := repo .RefreshIAMToken (); err != nil {
319
319
return false
320
320
}
321
321
// Check again to make sure that the new token has not expired
322
- if iamTokenInfo = NewIAMTokenInfo (c .IAMToken ()); iamTokenInfo .hasExpired () {
322
+ if iamTokenInfo = NewIAMTokenInfo (c .IAMToken ()); iamTokenInfo .HasExpired () {
323
323
return false
324
324
}
325
325
326
326
return true
327
- } else if iamTokenInfo .hasExpired () && refresh == "" {
327
+ } else if iamTokenInfo .HasExpired () && refresh == "" {
328
328
return false
329
329
} else {
330
330
return true
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ func (t IAMTokenInfo) exists() bool {
93
93
return t .ID != ""
94
94
}
95
95
96
- func (t IAMTokenInfo ) hasExpired () bool {
96
+ func (t IAMTokenInfo ) HasExpired () bool {
97
97
if ! t .exists () {
98
98
return true
99
99
}
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ func TestIAMTokenHasExpired(t *testing.T) {
98
98
for _ , testCase := range TestIAMTokenHasExpiredTestCases {
99
99
t .Run (testCase .name , func (t * testing.T ) {
100
100
tokenInfo := NewIAMTokenInfo (testCase .token )
101
- assert .Equal (t , testCase .isExpired , tokenInfo .hasExpired ())
101
+ assert .Equal (t , testCase .isExpired , tokenInfo .HasExpired ())
102
102
})
103
103
}
104
104
}
You can’t perform that action at this time.
0 commit comments