Skip to content

Commit 75b77f5

Browse files
committed
add more logging
1 parent f2c17b8 commit 75b77f5

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/core/src/auth/credentials/store.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export class CredentialsStore {
3131
*/
3232
public isValid(key: string): boolean {
3333
if (this.credentialsCache[key]) {
34+
//eslint-disable-next-line aws-toolkits/no-console-log
35+
console.log('credentialsCache=%O', this.credentialsCache[key])
3436
const expiration = this.credentialsCache[key].credentials.expiration
3537
return expiration !== undefined ? expiration >= new globals.clock.Date() : true
3638
}
@@ -42,6 +44,8 @@ export class CredentialsStore {
4244
* Returns undefined if the specified credentials are expired or not found.
4345
*/
4446
public async getCredentials(credentials: CredentialsId): Promise<CachedCredentials | undefined> {
47+
//eslint-disable-next-line aws-toolkits/no-console-log
48+
console.log('credentials.isValid=%O', this.isValid(asString(credentials)))
4549
if (this.isValid(asString(credentials))) {
4650
return this.credentialsCache[asString(credentials)]
4751
} else {

packages/core/src/auth/secondaryAuth.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ export class SecondaryAuth<T extends Connection = Connection> {
148148
})
149149

150150
const refreshConn = (event: string) => {
151+
//eslint-disable-next-line aws-toolkits/no-console-log
152+
console.log('refreshing connection with event=%s', event)
151153
getLogger().debug(`secondaryAuth: detected ${event} event in sso cache, refreshing auth.`)
152154
globals.clock.setTimeout(
153155
telemetry.function_call.run(

0 commit comments

Comments
 (0)