ag-awsauth 0.0.7 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/awsauth.js +0 -0
- package/dist/config.d.ts +12 -12
- package/dist/config.js +55 -55
- package/dist/helpers/awsconfig.d.ts +3 -3
- package/dist/helpers/awsconfig.js +52 -52
- package/dist/helpers/browser.d.ts +12 -12
- package/dist/helpers/browser.js +170 -167
- package/dist/helpers/input.d.ts +10 -10
- package/dist/helpers/input.js +95 -95
- package/dist/helpers/oidc.d.ts +5 -5
- package/dist/helpers/oidc.js +81 -81
- package/dist/helpers/sso.d.ts +21 -21
- package/dist/helpers/sso.js +143 -137
- package/dist/helpers/sts.d.ts +24 -24
- package/dist/helpers/sts.js +98 -98
- package/dist/index.d.ts +4 -4
- package/dist/index.js +115 -119
- package/dist/types.d.ts +55 -55
- package/dist/types.js +2 -2
- package/package.json +9 -10
- package/dist/direct.d.ts +0 -1
- package/dist/direct.js +0 -4
package/dist/helpers/input.js
CHANGED
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.enterMFA = exports.enterCreds = exports.readArguments = exports.chooseAppInstance = void 0;
|
|
16
|
-
const log_1 = require("ag-common/dist/common/helpers/log");
|
|
17
|
-
const string_1 = require("ag-common/dist/common/helpers/string");
|
|
18
|
-
const cli_select_1 = __importDefault(require("cli-select"));
|
|
19
|
-
const readline_sync_1 = require("readline-sync");
|
|
20
|
-
const yargs_1 = __importDefault(require("yargs"));
|
|
21
|
-
const helpers_1 = require("yargs/helpers");
|
|
22
|
-
const valueRenderer = (a) => `${a.name} [${a.id}]`;
|
|
23
|
-
function chooseAppInstance(ai, args) {
|
|
24
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
let ret;
|
|
26
|
-
if (args.applicationfilter) {
|
|
27
|
-
ret = ai.find((a) => (0, string_1.containsInsensitive)(valueRenderer(a), args.applicationfilter));
|
|
28
|
-
if (!ret) {
|
|
29
|
-
throw new Error('didnt find application with filter');
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
if (ret) {
|
|
33
|
-
(0, log_1.info)(`preselecting ${valueRenderer(ret)} from input ${args.applicationfilter}`);
|
|
34
|
-
return ret;
|
|
35
|
-
}
|
|
36
|
-
(0, log_1.info)('Choose app instance to connect to');
|
|
37
|
-
const res = yield (0, cli_select_1.default)({
|
|
38
|
-
values: ai,
|
|
39
|
-
valueRenderer,
|
|
40
|
-
});
|
|
41
|
-
return res.value;
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
exports.chooseAppInstance = chooseAppInstance;
|
|
45
|
-
function readArguments() {
|
|
46
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
-
const { applicationfilter, verbose, wipe, config } = yield (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv))
|
|
48
|
-
.help('h')
|
|
49
|
-
.alias('h', 'help')
|
|
50
|
-
.option('applicationfilter', {
|
|
51
|
-
alias: 'af',
|
|
52
|
-
type: 'string',
|
|
53
|
-
description: 'Will select account that matches passed in string',
|
|
54
|
-
})
|
|
55
|
-
.option('verbose', {
|
|
56
|
-
alias: 'v',
|
|
57
|
-
type: 'boolean',
|
|
58
|
-
description: 'Run with verbose logging',
|
|
59
|
-
default: false,
|
|
60
|
-
})
|
|
61
|
-
.option('wipe', {
|
|
62
|
-
alias: 'w',
|
|
63
|
-
type: 'boolean',
|
|
64
|
-
description: 'Clear previously saved session details and quit',
|
|
65
|
-
default: false,
|
|
66
|
-
})
|
|
67
|
-
.option('config', {
|
|
68
|
-
alias: 'c',
|
|
69
|
-
type: 'boolean',
|
|
70
|
-
description: 'Configure application settings',
|
|
71
|
-
default: false,
|
|
72
|
-
})
|
|
73
|
-
.parse();
|
|
74
|
-
return { applicationfilter, verbose, wipe, config };
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
exports.readArguments = readArguments;
|
|
78
|
-
function enterCreds() {
|
|
79
|
-
const username = (0, readline_sync_1.question)('Enter username:');
|
|
80
|
-
const password = (0, readline_sync_1.question)('Enter password:', {
|
|
81
|
-
hideEchoBack: true,
|
|
82
|
-
});
|
|
83
|
-
return { username, password };
|
|
84
|
-
}
|
|
85
|
-
exports.enterCreds = enterCreds;
|
|
86
|
-
function enterMFA() {
|
|
87
|
-
return {
|
|
88
|
-
mfa: (0, readline_sync_1.question)('Enter MFA code:', {
|
|
89
|
-
min: 6,
|
|
90
|
-
max: 6,
|
|
91
|
-
hideEchoBack: true,
|
|
92
|
-
}),
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
exports.enterMFA = enterMFA;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.enterMFA = exports.enterCreds = exports.readArguments = exports.chooseAppInstance = void 0;
|
|
16
|
+
const log_1 = require("ag-common/dist/common/helpers/log");
|
|
17
|
+
const string_1 = require("ag-common/dist/common/helpers/string");
|
|
18
|
+
const cli_select_1 = __importDefault(require("cli-select"));
|
|
19
|
+
const readline_sync_1 = require("readline-sync");
|
|
20
|
+
const yargs_1 = __importDefault(require("yargs"));
|
|
21
|
+
const helpers_1 = require("yargs/helpers");
|
|
22
|
+
const valueRenderer = (a) => `${a.name} [${a.id}]`;
|
|
23
|
+
function chooseAppInstance(ai, args) {
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
let ret;
|
|
26
|
+
if (args.applicationfilter) {
|
|
27
|
+
ret = ai.find((a) => (0, string_1.containsInsensitive)(valueRenderer(a), args.applicationfilter));
|
|
28
|
+
if (!ret) {
|
|
29
|
+
throw new Error('didnt find application with filter');
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (ret) {
|
|
33
|
+
(0, log_1.info)(`preselecting ${valueRenderer(ret)} from input ${args.applicationfilter}`);
|
|
34
|
+
return ret;
|
|
35
|
+
}
|
|
36
|
+
(0, log_1.info)('Choose app instance to connect to');
|
|
37
|
+
const res = yield (0, cli_select_1.default)({
|
|
38
|
+
values: ai,
|
|
39
|
+
valueRenderer,
|
|
40
|
+
});
|
|
41
|
+
return res.value;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
exports.chooseAppInstance = chooseAppInstance;
|
|
45
|
+
function readArguments() {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
const { applicationfilter, verbose, wipe, config } = yield (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv))
|
|
48
|
+
.help('h')
|
|
49
|
+
.alias('h', 'help')
|
|
50
|
+
.option('applicationfilter', {
|
|
51
|
+
alias: 'af',
|
|
52
|
+
type: 'string',
|
|
53
|
+
description: 'Will select account that matches passed in string',
|
|
54
|
+
})
|
|
55
|
+
.option('verbose', {
|
|
56
|
+
alias: 'v',
|
|
57
|
+
type: 'boolean',
|
|
58
|
+
description: 'Run with verbose logging',
|
|
59
|
+
default: false,
|
|
60
|
+
})
|
|
61
|
+
.option('wipe', {
|
|
62
|
+
alias: 'w',
|
|
63
|
+
type: 'boolean',
|
|
64
|
+
description: 'Clear previously saved session details and quit',
|
|
65
|
+
default: false,
|
|
66
|
+
})
|
|
67
|
+
.option('config', {
|
|
68
|
+
alias: 'c',
|
|
69
|
+
type: 'boolean',
|
|
70
|
+
description: 'Configure application settings',
|
|
71
|
+
default: false,
|
|
72
|
+
})
|
|
73
|
+
.parse();
|
|
74
|
+
return { applicationfilter, verbose, wipe, config };
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
exports.readArguments = readArguments;
|
|
78
|
+
function enterCreds() {
|
|
79
|
+
const username = (0, readline_sync_1.question)('Enter username:');
|
|
80
|
+
const password = (0, readline_sync_1.question)('Enter password:', {
|
|
81
|
+
hideEchoBack: true,
|
|
82
|
+
});
|
|
83
|
+
return { username, password };
|
|
84
|
+
}
|
|
85
|
+
exports.enterCreds = enterCreds;
|
|
86
|
+
function enterMFA() {
|
|
87
|
+
return {
|
|
88
|
+
mfa: (0, readline_sync_1.question)('Enter MFA code:', {
|
|
89
|
+
min: 6,
|
|
90
|
+
max: 6,
|
|
91
|
+
hideEchoBack: true,
|
|
92
|
+
}),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
exports.enterMFA = enterMFA;
|
package/dist/helpers/oidc.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IAwsCreds } from '../types';
|
|
2
|
-
export declare function requestMFA(p: {
|
|
3
|
-
identityCenterRegion: string;
|
|
4
|
-
ssoStartUrl: string;
|
|
5
|
-
}): Promise<IAwsCreds>;
|
|
1
|
+
import { IAwsCreds } from '../types';
|
|
2
|
+
export declare function requestMFA(p: {
|
|
3
|
+
identityCenterRegion: string;
|
|
4
|
+
ssoStartUrl: string;
|
|
5
|
+
}): Promise<IAwsCreds>;
|
package/dist/helpers/oidc.js
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.requestMFA = void 0;
|
|
13
|
-
const client_sso_oidc_1 = require("@aws-sdk/client-sso-oidc");
|
|
14
|
-
const log_1 = require("ag-common/dist/common/helpers/log");
|
|
15
|
-
const sleep_1 = require("ag-common/dist/common/helpers/sleep");
|
|
16
|
-
const config_1 = require("../config");
|
|
17
|
-
const browser_1 = require("./browser");
|
|
18
|
-
const input_1 = require("./input");
|
|
19
|
-
function requestMFA(p) {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const sso_oidc = new client_sso_oidc_1.SSOOIDCClient({ region: p.identityCenterRegion });
|
|
22
|
-
(0, log_1.warn)('starting MFA flow');
|
|
23
|
-
const creds = (0, input_1.enterCreds)();
|
|
24
|
-
const rcc = yield sso_oidc.send(new client_sso_oidc_1.RegisterClientCommand({
|
|
25
|
-
clientName: creds.username,
|
|
26
|
-
clientType: 'public',
|
|
27
|
-
}));
|
|
28
|
-
const sda = yield sso_oidc.send(new client_sso_oidc_1.StartDeviceAuthorizationCommand({
|
|
29
|
-
clientId: rcc.clientId,
|
|
30
|
-
clientSecret: rcc.clientSecret,
|
|
31
|
-
startUrl: p.ssoStartUrl,
|
|
32
|
-
}));
|
|
33
|
-
if (!sda.verificationUriComplete) {
|
|
34
|
-
throw new Error('no verif url');
|
|
35
|
-
}
|
|
36
|
-
const { ssoAuthn } = yield (0, browser_1.getMFA)({
|
|
37
|
-
verificationUriComplete: sda.verificationUriComplete,
|
|
38
|
-
creds,
|
|
39
|
-
});
|
|
40
|
-
let accessToken;
|
|
41
|
-
//keep trying to receive auth until user clicks, or timeout
|
|
42
|
-
let trycount = 0;
|
|
43
|
-
do {
|
|
44
|
-
if (trycount > 3) {
|
|
45
|
-
throw new Error('too many fails');
|
|
46
|
-
}
|
|
47
|
-
trycount += 1;
|
|
48
|
-
try {
|
|
49
|
-
const ctc = yield sso_oidc.send(new client_sso_oidc_1.CreateTokenCommand({
|
|
50
|
-
clientId: rcc.clientId,
|
|
51
|
-
clientSecret: rcc.clientSecret,
|
|
52
|
-
code: sda.userCode,
|
|
53
|
-
deviceCode: sda.deviceCode,
|
|
54
|
-
grantType: 'urn:ietf:params:oauth:grant-type:device_code',
|
|
55
|
-
}));
|
|
56
|
-
accessToken = ctc.accessToken;
|
|
57
|
-
if (!accessToken) {
|
|
58
|
-
throw new Error('no access token');
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
catch (e) {
|
|
62
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
63
|
-
const es = e.toString();
|
|
64
|
-
if (!es.includes('AuthorizationPendingException')) {
|
|
65
|
-
throw e;
|
|
66
|
-
}
|
|
67
|
-
(0, log_1.warn)('waiting for device approval...');
|
|
68
|
-
yield (0, sleep_1.sleep)(5000);
|
|
69
|
-
}
|
|
70
|
-
} while (!accessToken);
|
|
71
|
-
return {
|
|
72
|
-
accessToken,
|
|
73
|
-
ssoAuthn,
|
|
74
|
-
region: config_1.identityCenterRegion,
|
|
75
|
-
accessKeyId: '',
|
|
76
|
-
secretAccessKey: '',
|
|
77
|
-
sessionToken: '',
|
|
78
|
-
};
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
exports.requestMFA = requestMFA;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.requestMFA = void 0;
|
|
13
|
+
const client_sso_oidc_1 = require("@aws-sdk/client-sso-oidc");
|
|
14
|
+
const log_1 = require("ag-common/dist/common/helpers/log");
|
|
15
|
+
const sleep_1 = require("ag-common/dist/common/helpers/sleep");
|
|
16
|
+
const config_1 = require("../config");
|
|
17
|
+
const browser_1 = require("./browser");
|
|
18
|
+
const input_1 = require("./input");
|
|
19
|
+
function requestMFA(p) {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const sso_oidc = new client_sso_oidc_1.SSOOIDCClient({ region: p.identityCenterRegion });
|
|
22
|
+
(0, log_1.warn)('starting MFA flow');
|
|
23
|
+
const creds = (0, input_1.enterCreds)();
|
|
24
|
+
const rcc = yield sso_oidc.send(new client_sso_oidc_1.RegisterClientCommand({
|
|
25
|
+
clientName: creds.username,
|
|
26
|
+
clientType: 'public',
|
|
27
|
+
}));
|
|
28
|
+
const sda = yield sso_oidc.send(new client_sso_oidc_1.StartDeviceAuthorizationCommand({
|
|
29
|
+
clientId: rcc.clientId,
|
|
30
|
+
clientSecret: rcc.clientSecret,
|
|
31
|
+
startUrl: p.ssoStartUrl,
|
|
32
|
+
}));
|
|
33
|
+
if (!sda.verificationUriComplete) {
|
|
34
|
+
throw new Error('no verif url');
|
|
35
|
+
}
|
|
36
|
+
const { ssoAuthn } = yield (0, browser_1.getMFA)({
|
|
37
|
+
verificationUriComplete: sda.verificationUriComplete,
|
|
38
|
+
creds,
|
|
39
|
+
});
|
|
40
|
+
let accessToken;
|
|
41
|
+
//keep trying to receive auth until user clicks, or timeout
|
|
42
|
+
let trycount = 0;
|
|
43
|
+
do {
|
|
44
|
+
if (trycount > 3) {
|
|
45
|
+
throw new Error('too many fails');
|
|
46
|
+
}
|
|
47
|
+
trycount += 1;
|
|
48
|
+
try {
|
|
49
|
+
const ctc = yield sso_oidc.send(new client_sso_oidc_1.CreateTokenCommand({
|
|
50
|
+
clientId: rcc.clientId,
|
|
51
|
+
clientSecret: rcc.clientSecret,
|
|
52
|
+
code: sda.userCode,
|
|
53
|
+
deviceCode: sda.deviceCode,
|
|
54
|
+
grantType: 'urn:ietf:params:oauth:grant-type:device_code',
|
|
55
|
+
}));
|
|
56
|
+
accessToken = ctc.accessToken;
|
|
57
|
+
if (!accessToken) {
|
|
58
|
+
throw new Error('no access token');
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
catch (e) {
|
|
62
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
63
|
+
const es = e.toString();
|
|
64
|
+
if (!es.includes('AuthorizationPendingException')) {
|
|
65
|
+
throw e;
|
|
66
|
+
}
|
|
67
|
+
(0, log_1.warn)('waiting for device approval...');
|
|
68
|
+
yield (0, sleep_1.sleep)(5000);
|
|
69
|
+
}
|
|
70
|
+
} while (!accessToken);
|
|
71
|
+
return {
|
|
72
|
+
accessToken,
|
|
73
|
+
ssoAuthn,
|
|
74
|
+
region: config_1.identityCenterRegion,
|
|
75
|
+
accessKeyId: '',
|
|
76
|
+
secretAccessKey: '',
|
|
77
|
+
sessionToken: '',
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
exports.requestMFA = requestMFA;
|
package/dist/helpers/sso.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { IAppInstance, IAwsCreds } from '../types';
|
|
2
|
-
export declare const getAssumedRole: (p: {
|
|
3
|
-
accessToken: string;
|
|
4
|
-
accountId?: string;
|
|
5
|
-
}) => Promise<{
|
|
6
|
-
accountId: string;
|
|
7
|
-
roleName: string;
|
|
8
|
-
}>;
|
|
9
|
-
export declare const getOIDCCredentialsFromAccessToken: (p: {
|
|
10
|
-
accessToken: string;
|
|
11
|
-
ssoAuthn: string;
|
|
12
|
-
}) => Promise<IAwsCreds>;
|
|
13
|
-
export declare function appInstances(p: {
|
|
14
|
-
ssoAuthn: string;
|
|
15
|
-
}): Promise<IAppInstance[]>;
|
|
16
|
-
export declare function getSamlAssertion(p: IAwsCreds, instance: IAppInstance): Promise<{
|
|
17
|
-
samlAssertion: string;
|
|
18
|
-
providerArn: string;
|
|
19
|
-
roleArn: string;
|
|
20
|
-
}>;
|
|
21
|
-
export declare const tryExistingCredentials: () => Promise<IAwsCreds | undefined>;
|
|
1
|
+
import { IAppInstance, IAwsCreds } from '../types';
|
|
2
|
+
export declare const getAssumedRole: (p: {
|
|
3
|
+
accessToken: string;
|
|
4
|
+
accountId?: string;
|
|
5
|
+
}) => Promise<{
|
|
6
|
+
accountId: string;
|
|
7
|
+
roleName: string;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const getOIDCCredentialsFromAccessToken: (p: {
|
|
10
|
+
accessToken: string;
|
|
11
|
+
ssoAuthn: string;
|
|
12
|
+
}) => Promise<IAwsCreds>;
|
|
13
|
+
export declare function appInstances(p: {
|
|
14
|
+
ssoAuthn: string;
|
|
15
|
+
}): Promise<IAppInstance[]>;
|
|
16
|
+
export declare function getSamlAssertion(p: IAwsCreds, instance: IAppInstance): Promise<{
|
|
17
|
+
samlAssertion: string;
|
|
18
|
+
providerArn: string;
|
|
19
|
+
roleArn: string;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const tryExistingCredentials: () => Promise<IAwsCreds | undefined>;
|