@@ -434,7 +434,7 @@ export class Auth implements AuthService, ConnectionManager {
434
434
435
435
return provider . invalidate ( )
436
436
} else if ( profile . type === 'iam' ) {
437
- globals . credentialsStore . invalidateCredentials ( fromString ( id ) )
437
+ globals . loginManager . store . invalidateCredentials ( fromString ( id ) )
438
438
}
439
439
}
440
440
@@ -518,7 +518,8 @@ export class Auth implements AuthService, ConnectionManager {
518
518
profile : StoredProfile < SsoProfile >
519
519
) : SsoConnection & StatefulConnection {
520
520
const provider = this . getTokenProvider ( id , profile )
521
- const label = `SSO (${ profile . startUrl } )`
521
+ const truncatedUrl = profile . startUrl . match ( / h t t p s ? : \/ \/ ( .* ) \. a w s a p p s \. c o m \/ s t a r t / ) ?. [ 1 ] ?? profile . startUrl
522
+ const label = `IAM Identity Center (${ truncatedUrl } )`
522
523
523
524
return {
524
525
id,
@@ -547,14 +548,15 @@ export class Auth implements AuthService, ConnectionManager {
547
548
548
549
private async createCachedCredentials ( provider : CredentialsProvider ) {
549
550
const providerId = provider . getCredentialsId ( )
550
- globals . credentialsStore . invalidateCredentials ( providerId )
551
- const { credentials } = await globals . credentialsStore . upsertCredentials ( providerId , provider )
551
+ globals . loginManager . store . invalidateCredentials ( providerId )
552
+ const { credentials } = await globals . loginManager . store . upsertCredentials ( providerId , provider )
553
+ await globals . loginManager . validateCredentials ( credentials , provider . getDefaultRegion ( ) )
552
554
553
555
return credentials
554
556
}
555
557
556
558
private async getCachedCredentials ( provider : CredentialsProvider ) {
557
- const creds = await globals . credentialsStore . getCredentials ( provider . getCredentialsId ( ) )
559
+ const creds = await globals . loginManager . store . getCredentials ( provider . getCredentialsId ( ) )
558
560
if ( creds !== undefined && creds . credentialsHashCode === provider . getHashCode ( ) ) {
559
561
return creds . credentials
560
562
}
@@ -784,7 +786,7 @@ export async function createStartUrlPrompter(title: string) {
784
786
785
787
return createInputBox ( {
786
788
title : `${ title } : Enter Start URL` ,
787
- placeholder : "Enter start URL for your organization's SSO " ,
789
+ placeholder : "Enter start URL for your organization's AWS access portal " ,
788
790
buttons : createCommonButtons ( ) ,
789
791
validateInput : validateSsoUrl ,
790
792
} )
@@ -807,7 +809,7 @@ const addConnection = Commands.register('aws.auth.addConnection', async () => {
807
809
case 'iam' :
808
810
return await globals . awsContextCommands . onCommandCreateCredentialsProfile ( )
809
811
case 'sso' : {
810
- const startUrlPrompter = await createStartUrlPrompter ( 'SSO Connection ' )
812
+ const startUrlPrompter = await createStartUrlPrompter ( 'IAM Identity Center ' )
811
813
const startUrl = await startUrlPrompter . prompt ( )
812
814
if ( ! isValidResponse ( startUrl ) ) {
813
815
throw new CancellationError ( 'user' )
0 commit comments