This repository was archived by the owner on Mar 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " extaws" ,
3- "version" : " 0.0.13 " ,
3+ "version" : " 0.0.14 " ,
44 "description" : " Extend Okta Aws Authentication" ,
55 "main" : " dist/index.js" ,
66 "files" : [
Original file line number Diff line number Diff line change @@ -168,15 +168,14 @@ export class ExtAws {
168168 * @returns The selected role
169169 */
170170 private static async selectRole ( roles : STSAssumeRole [ ] ) : Promise < STSAssumeRole > {
171- if ( roles . length === 1 ) return roles [ 0 ]
172171 const roleList = roles . map ( ( role , index ) => {
173172 const roleName = role . role . split ( '/' )
174173 return { name : roleName [ roleName . length - 1 ] , value : index }
175174 } )
176175 const { role } = await ExtAws . inquire < { role : number } > ( [ {
177176 name : 'role' ,
178177 type : 'list' ,
179- message : 'Please select the role to assume ' ,
178+ message : 'Available roles: ' ,
180179 choices : roleList ,
181180 } ] )
182181 return roles [ role ]
@@ -425,8 +424,7 @@ export class ExtAws {
425424 if ( searchResult !== undefined ) {
426425 userRole = searchResult
427426 } else {
428- spinner . text = `Provided role(${ props . role } ) was not found. Please select from roles found`
429- spinner . stop ( )
427+ spinner . fail ( `You do not have authorization to assume role (${ props . role } ). Please select from roles found` )
430428 userRole = await ExtAws . selectRole ( roles )
431429 spinner . start ( 'Logging in...' )
432430 }
You can’t perform that action at this time.
0 commit comments