@affinidi/cli 2.0.0-beta.8 → 2.0.0
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/README.md +140 -60
- package/dist/commands/generate/app.d.ts +7 -1
- package/dist/commands/generate/app.js +73 -34
- package/dist/commands/generate/app.js.map +1 -1
- package/dist/commands/iam/add-principal.js +8 -9
- package/dist/commands/iam/add-principal.js.map +1 -1
- package/dist/commands/iam/get-policies.js +8 -9
- package/dist/commands/iam/get-policies.js.map +1 -1
- package/dist/commands/iam/list-principals.js +1 -2
- package/dist/commands/iam/list-principals.js.map +1 -1
- package/dist/commands/iam/remove-principal.js +8 -9
- package/dist/commands/iam/remove-principal.js.map +1 -1
- package/dist/commands/iam/update-policies.js +18 -17
- package/dist/commands/iam/update-policies.js.map +1 -1
- package/dist/commands/login/add-user-to-group.d.ts +1 -1
- package/dist/commands/login/add-user-to-group.js +9 -10
- package/dist/commands/login/add-user-to-group.js.map +1 -1
- package/dist/commands/login/create-config.js +13 -14
- package/dist/commands/login/create-config.js.map +1 -1
- package/dist/commands/login/create-group.js +3 -4
- package/dist/commands/login/create-group.js.map +1 -1
- package/dist/commands/login/delete-config.js +5 -6
- package/dist/commands/login/delete-config.js.map +1 -1
- package/dist/commands/login/delete-group.js +5 -6
- package/dist/commands/login/delete-group.js.map +1 -1
- package/dist/commands/login/export-configs.d.ts +10 -0
- package/dist/commands/login/export-configs.js +67 -0
- package/dist/commands/login/export-configs.js.map +1 -0
- package/dist/commands/login/export-groups.d.ts +10 -0
- package/dist/commands/login/export-groups.js +64 -0
- package/dist/commands/login/export-groups.js.map +1 -0
- package/dist/commands/login/get-config.js +5 -6
- package/dist/commands/login/get-config.js.map +1 -1
- package/dist/commands/login/get-group.js +5 -6
- package/dist/commands/login/get-group.js.map +1 -1
- package/dist/commands/login/import-configs.d.ts +12 -0
- package/dist/commands/login/import-configs.js +70 -0
- package/dist/commands/login/import-configs.js.map +1 -0
- package/dist/commands/login/import-groups.d.ts +12 -0
- package/dist/commands/login/import-groups.js +51 -0
- package/dist/commands/login/import-groups.js.map +1 -0
- package/dist/commands/login/list-configs.js +1 -2
- package/dist/commands/login/list-configs.js.map +1 -1
- package/dist/commands/login/list-groups.js +1 -2
- package/dist/commands/login/list-groups.js.map +1 -1
- package/dist/commands/login/list-users-in-group.js +5 -6
- package/dist/commands/login/list-users-in-group.js.map +1 -1
- package/dist/commands/login/remove-user-from-group.d.ts +2 -2
- package/dist/commands/login/remove-user-from-group.js +10 -11
- package/dist/commands/login/remove-user-from-group.js.map +1 -1
- package/dist/commands/login/update-config.js +11 -12
- package/dist/commands/login/update-config.js.map +1 -1
- package/dist/commands/project/create-project.js +8 -9
- package/dist/commands/project/create-project.js.map +1 -1
- package/dist/commands/project/get-active-project.js +5 -6
- package/dist/commands/project/get-active-project.js.map +1 -1
- package/dist/commands/project/list-projects.js +2 -3
- package/dist/commands/project/list-projects.js.map +1 -1
- package/dist/commands/project/select-project.js +13 -20
- package/dist/commands/project/select-project.js.map +1 -1
- package/dist/commands/start.d.ts +0 -3
- package/dist/commands/start.js +17 -22
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/stop.js +5 -4
- package/dist/commands/stop.js.map +1 -1
- package/dist/commands/token/create-token.d.ts +2 -2
- package/dist/commands/token/create-token.js +8 -9
- package/dist/commands/token/create-token.js.map +1 -1
- package/dist/commands/token/delete-token.js +5 -6
- package/dist/commands/token/delete-token.js.map +1 -1
- package/dist/commands/token/get-token.d.ts +2 -2
- package/dist/commands/token/get-token.js +5 -6
- package/dist/commands/token/get-token.js.map +1 -1
- package/dist/commands/token/list-tokens.d.ts +2 -2
- package/dist/commands/token/list-tokens.js +3 -4
- package/dist/commands/token/list-tokens.js.map +1 -1
- package/dist/commands/token/update-token.d.ts +2 -2
- package/dist/commands/token/update-token.js +8 -9
- package/dist/commands/token/update-token.js.map +1 -1
- package/dist/commands/whoami.d.ts +1 -4
- package/dist/commands/whoami.js +5 -22
- package/dist/commands/whoami.js.map +1 -1
- package/dist/common/constants.d.ts +13 -4
- package/dist/common/constants.js +12 -7
- package/dist/common/constants.js.map +1 -1
- package/dist/{helpers/generate-error-message.js → common/error-messages.js} +1 -1
- package/dist/common/error-messages.js.map +1 -0
- package/dist/{helpers/prompt-required-flags.js → common/prompts.js} +5 -5
- package/dist/common/prompts.js.map +1 -0
- package/dist/{helpers/input-length-validation.d.ts → common/validators.d.ts} +1 -1
- package/dist/{helpers/input-length-validation.js → common/validators.js} +4 -4
- package/dist/common/validators.js.map +1 -0
- package/dist/helpers/app.d.ts +11 -0
- package/dist/helpers/app.js +92 -0
- package/dist/helpers/app.js.map +1 -0
- package/dist/services/affinidi/auth/auth-result-page.d.ts +1 -0
- package/dist/services/affinidi/auth/{providers/error-login-page.js → auth-result-page.js} +6 -7
- package/dist/services/affinidi/auth/auth-result-page.js.map +1 -0
- package/dist/services/affinidi/auth/bff-auth-provider.d.ts +26 -0
- package/dist/services/affinidi/auth/bff-auth-provider.js +133 -0
- package/dist/services/affinidi/auth/bff-auth-provider.js.map +1 -0
- package/dist/services/affinidi/auth/{providers/types.d.ts → types.d.ts} +1 -4
- package/dist/services/affinidi/auth/types.js.map +1 -0
- package/dist/services/affinidi/bff-service.d.ts +27 -0
- package/dist/services/affinidi/bff-service.js +141 -0
- package/dist/services/affinidi/bff-service.js.map +1 -0
- package/dist/services/affinidi/bff-service.types.d.ts +38 -0
- package/dist/services/affinidi/{config.js → bff-service.types.js} +1 -1
- package/dist/services/affinidi/bff-service.types.js.map +1 -0
- package/dist/services/affinidi/{errors/index.js → errors.js} +6 -3
- package/dist/services/affinidi/errors.js.map +1 -0
- package/dist/services/affinidi/iam/iam.api.d.ts +120 -105
- package/dist/services/affinidi/iam/iam.api.js +39 -118
- package/dist/services/affinidi/iam/iam.api.js.map +1 -1
- package/dist/services/affinidi/iam/index.d.ts +15 -15
- package/dist/services/affinidi/iam/index.js +34 -118
- package/dist/services/affinidi/iam/index.js.map +1 -1
- package/dist/services/affinidi/logger/console-logger-adapter.js.map +1 -0
- package/dist/services/affinidi/logger/index.js.map +1 -0
- package/dist/services/affinidi/logger/logger-adapter.js.map +1 -0
- package/dist/services/affinidi/vp-adapter/index.d.ts +12 -12
- package/dist/services/affinidi/vp-adapter/index.js +37 -70
- package/dist/services/affinidi/vp-adapter/index.js.map +1 -1
- package/dist/services/affinidi/vp-adapter/vp-adapter.api.d.ts +314 -54
- package/dist/services/affinidi/vp-adapter/vp-adapter.api.js +81 -15
- package/dist/services/affinidi/vp-adapter/vp-adapter.api.js.map +1 -1
- package/dist/services/credentials-vault.d.ts +19 -0
- package/dist/services/credentials-vault.js +33 -0
- package/dist/services/credentials-vault.js.map +1 -0
- package/dist/services/env-config.d.ts +35 -0
- package/dist/services/env-config.js +39 -0
- package/dist/services/env-config.js.map +1 -0
- package/dist/services/generator/auth0.d.ts +2 -1
- package/dist/services/generator/auth0.js +6 -7
- package/dist/services/generator/auth0.js.map +1 -1
- package/package.json +6 -15
- package/dist/helpers/generate-error-message.js.map +0 -1
- package/dist/helpers/index.d.ts +0 -3
- package/dist/helpers/index.js +0 -11
- package/dist/helpers/index.js.map +0 -1
- package/dist/helpers/input-length-validation.js.map +0 -1
- package/dist/helpers/prompt-required-flags.js.map +0 -1
- package/dist/hooks/check/check-version.d.ts +0 -17
- package/dist/hooks/check/check-version.js +0 -24
- package/dist/hooks/check/check-version.js.map +0 -1
- package/dist/services/affinidi/adapters/index.d.ts +0 -1
- package/dist/services/affinidi/adapters/index.js +0 -5
- package/dist/services/affinidi/adapters/index.js.map +0 -1
- package/dist/services/affinidi/adapters/logger/console-logger-adapter.js.map +0 -1
- package/dist/services/affinidi/adapters/logger/index.js.map +0 -1
- package/dist/services/affinidi/adapters/logger/logger-adapter.js.map +0 -1
- package/dist/services/affinidi/auth/index.d.ts +0 -62
- package/dist/services/affinidi/auth/index.js +0 -131
- package/dist/services/affinidi/auth/index.js.map +0 -1
- package/dist/services/affinidi/auth/providers/config.d.ts +0 -15
- package/dist/services/affinidi/auth/providers/config.js +0 -33
- package/dist/services/affinidi/auth/providers/config.js.map +0 -1
- package/dist/services/affinidi/auth/providers/error-login-page.d.ts +0 -1
- package/dist/services/affinidi/auth/providers/error-login-page.js.map +0 -1
- package/dist/services/affinidi/auth/providers/index.d.ts +0 -3
- package/dist/services/affinidi/auth/providers/index.js +0 -8
- package/dist/services/affinidi/auth/providers/index.js.map +0 -1
- package/dist/services/affinidi/auth/providers/ory-pkce.d.ts +0 -47
- package/dist/services/affinidi/auth/providers/ory-pkce.js +0 -216
- package/dist/services/affinidi/auth/providers/ory-pkce.js.map +0 -1
- package/dist/services/affinidi/auth/providers/ory.d.ts +0 -22
- package/dist/services/affinidi/auth/providers/ory.js +0 -154
- package/dist/services/affinidi/auth/providers/ory.js.map +0 -1
- package/dist/services/affinidi/auth/providers/successful-login-page.d.ts +0 -1
- package/dist/services/affinidi/auth/providers/successful-login-page.js +0 -110
- package/dist/services/affinidi/auth/providers/successful-login-page.js.map +0 -1
- package/dist/services/affinidi/auth/providers/types.js.map +0 -1
- package/dist/services/affinidi/auth/token.d.ts +0 -54
- package/dist/services/affinidi/auth/token.js +0 -121
- package/dist/services/affinidi/auth/token.js.map +0 -1
- package/dist/services/affinidi/config.d.ts +0 -12
- package/dist/services/affinidi/config.js.map +0 -1
- package/dist/services/affinidi/errors/index.js.map +0 -1
- package/dist/services/affinidi/index.d.ts +0 -24
- package/dist/services/affinidi/index.js +0 -52
- package/dist/services/affinidi/index.js.map +0 -1
- package/dist/services/config/index.d.ts +0 -36
- package/dist/services/config/index.js +0 -160
- package/dist/services/config/index.js.map +0 -1
- package/dist/services/index.d.ts +0 -1
- package/dist/services/index.js +0 -6
- package/dist/services/index.js.map +0 -1
- package/dist/services/urls.d.ts +0 -2
- package/dist/services/urls.js +0 -12
- package/dist/services/urls.js.map +0 -1
- /package/dist/{helpers/generate-error-message.d.ts → common/error-messages.d.ts} +0 -0
- /package/dist/{helpers/prompt-required-flags.d.ts → common/prompts.d.ts} +0 -0
- /package/dist/services/affinidi/auth/{providers/types.js → types.js} +0 -0
- /package/dist/services/affinidi/{errors/index.d.ts → errors.d.ts} +0 -0
- /package/dist/services/affinidi/{adapters/logger → logger}/console-logger-adapter.d.ts +0 -0
- /package/dist/services/affinidi/{adapters/logger → logger}/console-logger-adapter.js +0 -0
- /package/dist/services/affinidi/{adapters/logger → logger}/index.d.ts +0 -0
- /package/dist/services/affinidi/{adapters/logger → logger}/index.js +0 -0
- /package/dist/services/affinidi/{adapters/logger → logger}/logger-adapter.d.ts +0 -0
- /package/dist/services/affinidi/{adapters/logger → logger}/logger-adapter.js +0 -0
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OryAuthenticator = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const crypto_1 = require("crypto");
|
|
6
|
-
const core_1 = require("@oclif/core");
|
|
7
|
-
const express_1 = tslib_1.__importDefault(require("express"));
|
|
8
|
-
const open_1 = tslib_1.__importDefault(require("open"));
|
|
9
|
-
const simple_oauth2_1 = require("simple-oauth2");
|
|
10
|
-
const config_1 = require("./config");
|
|
11
|
-
const token_1 = require("../token");
|
|
12
|
-
const REDIRECT_URI = `${config_1.config.redirectHost}:${config_1.config.expressPort}${config_1.config.redirectPath}`;
|
|
13
|
-
class OryAuthenticator {
|
|
14
|
-
constructor({ clientId, host, logger }) {
|
|
15
|
-
this.clientId = clientId;
|
|
16
|
-
this.host = host;
|
|
17
|
-
this.logger = logger;
|
|
18
|
-
}
|
|
19
|
-
createAuthorizationClient() {
|
|
20
|
-
return new simple_oauth2_1.AuthorizationCode({
|
|
21
|
-
client: {
|
|
22
|
-
id: this.clientId,
|
|
23
|
-
secret: '',
|
|
24
|
-
},
|
|
25
|
-
auth: {
|
|
26
|
-
tokenHost: this.host,
|
|
27
|
-
authorizePath: '/oauth2/auth',
|
|
28
|
-
tokenPath: '/oauth2/token',
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
async exchangeForToken(client, code) {
|
|
33
|
-
const accessToken = await client.getToken({
|
|
34
|
-
code,
|
|
35
|
-
redirect_uri: REDIRECT_URI,
|
|
36
|
-
scope: config_1.config.scope,
|
|
37
|
-
});
|
|
38
|
-
this.logger.debug(`Access token has been received: ${JSON.stringify(accessToken)}`);
|
|
39
|
-
return accessToken;
|
|
40
|
-
}
|
|
41
|
-
async endpointHandler(params) {
|
|
42
|
-
const { resolve, reject, server, res, req, timeout, client } = params;
|
|
43
|
-
try {
|
|
44
|
-
await this.handleAllow({ resolve, res, req, timeout, client });
|
|
45
|
-
this.handleDecline({ reject, res, req, timeout });
|
|
46
|
-
}
|
|
47
|
-
catch (e) {
|
|
48
|
-
core_1.ux.action.stop('Failed to authenticate');
|
|
49
|
-
this.logger.error(e.toString());
|
|
50
|
-
reject(e);
|
|
51
|
-
}
|
|
52
|
-
finally {
|
|
53
|
-
this.shutDownServer(server);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
async handleAllow(params) {
|
|
57
|
-
const { res, req, resolve, timeout, client } = params;
|
|
58
|
-
if (req.query.code) {
|
|
59
|
-
const code = String(req.query.code);
|
|
60
|
-
this.logger.debug(`Callback request has been received. Code: ${code}\n----------------8<----------------------------\n`);
|
|
61
|
-
clearTimeout(timeout);
|
|
62
|
-
const token = await this.exchangeForToken(client, code);
|
|
63
|
-
token_1.tokenService.setUserToken(token.token);
|
|
64
|
-
resolve(token.token.access_token);
|
|
65
|
-
core_1.ux.action.stop('Authenticated successfully!');
|
|
66
|
-
res.end(config_1.config.successHTML);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
handleDecline(params) {
|
|
70
|
-
const { res, req, reject, timeout } = params;
|
|
71
|
-
const { error } = req.query;
|
|
72
|
-
const errorDescription = req.query.error_description;
|
|
73
|
-
if (error) {
|
|
74
|
-
clearTimeout(timeout);
|
|
75
|
-
const { errorMessage, errorPageTitle, errorPageContext } = this.generateErrorMessages(error, errorDescription);
|
|
76
|
-
this.logger.debug(`error: ${error}`);
|
|
77
|
-
this.logger.debug(`error_description: ${errorDescription}`);
|
|
78
|
-
core_1.ux.action.stop(`Authenticated failed!\n\n ${errorMessage}`);
|
|
79
|
-
reject(errorMessage);
|
|
80
|
-
res.end(config_1.config.erroredLoginPage(errorPageTitle, errorPageContext));
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
generateErrorMessages(error, errorDescription) {
|
|
84
|
-
const errorPageTitle = 'Login failed';
|
|
85
|
-
let errorMessage;
|
|
86
|
-
let errorPageContext;
|
|
87
|
-
switch (error) {
|
|
88
|
-
case 'access_denied':
|
|
89
|
-
errorMessage =
|
|
90
|
-
errorDescription === 'request_declined'
|
|
91
|
-
? 'You have declined a request to access your data.\n\n'
|
|
92
|
-
: `Access denied with the description: ${errorDescription}.\n\n`;
|
|
93
|
-
errorPageContext =
|
|
94
|
-
errorDescription === 'request_declined'
|
|
95
|
-
? `You have declined permission to access your data. Granting access to your data is necessary to avail our services.<br>Please, return to the command prompt or terminal if you wish to attempt once more.`
|
|
96
|
-
: `Access denied with the description: ${errorDescription}.\n\n`;
|
|
97
|
-
break;
|
|
98
|
-
default:
|
|
99
|
-
errorMessage = 'Unknown problem.\n\n';
|
|
100
|
-
errorPageContext = 'Specified error is unexpected';
|
|
101
|
-
}
|
|
102
|
-
return {
|
|
103
|
-
errorPageTitle,
|
|
104
|
-
errorMessage,
|
|
105
|
-
errorPageContext,
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
async authenticate() {
|
|
109
|
-
const isPortInUse = await (0, config_1.isOryAuthCallbackPortInUse)();
|
|
110
|
-
if (isPortInUse) {
|
|
111
|
-
throw new Error(config_1.config.oryAuthCallbackPortUnavailableMessage);
|
|
112
|
-
}
|
|
113
|
-
const client = this.createAuthorizationClient();
|
|
114
|
-
return new Promise((resolve, reject) => {
|
|
115
|
-
this.logger.debug('Start express server');
|
|
116
|
-
const app = (0, express_1.default)();
|
|
117
|
-
const server = app.listen(config_1.config.expressPort, () => {
|
|
118
|
-
this.logger.debug(`Express server started listening on port ${config_1.config.expressPort}`);
|
|
119
|
-
});
|
|
120
|
-
const timeout = setTimeout(() => {
|
|
121
|
-
this.shutDownServer(server);
|
|
122
|
-
reject(new Error(`Authentication timeout (${config_1.config.redirectTimeoutMs / 1000}s) exceeded`));
|
|
123
|
-
}, config_1.config.redirectTimeoutMs);
|
|
124
|
-
app.get(config_1.config.redirectPath, async (req, res) => {
|
|
125
|
-
await this.endpointHandler({ req, res, resolve, reject, timeout, server, client });
|
|
126
|
-
});
|
|
127
|
-
const ssoUrl = client.authorizeURL({
|
|
128
|
-
redirect_uri: REDIRECT_URI,
|
|
129
|
-
scope: config_1.config.scope,
|
|
130
|
-
state: (0, crypto_1.randomUUID)(),
|
|
131
|
-
});
|
|
132
|
-
this.logger.info(config_1.config.getSSOMessage(ssoUrl));
|
|
133
|
-
core_1.ux.action.start('Authenticating in browser');
|
|
134
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
135
|
-
(0, open_1.default)(ssoUrl);
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
async logout() {
|
|
139
|
-
return new Promise((resolve) => {
|
|
140
|
-
resolve();
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
shutDownServer(server) {
|
|
144
|
-
server.close((error) => {
|
|
145
|
-
if (error) {
|
|
146
|
-
this.logger.error(`Error while shutting down the express server: ${error.message}`);
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
this.logger.debug('Express server has been successfully shut down');
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
exports.OryAuthenticator = OryAuthenticator;
|
|
154
|
-
//# sourceMappingURL=ory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ory.js","sourceRoot":"","sources":["../../../../../src/services/affinidi/auth/providers/ory.ts"],"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CAAC,CAAC,CAAA;YAEF,MAAM,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC;gBACjC,YAAY,EAAE,YAAY;gBAC1B,KAAK,EAAE,eAAM,CAAC,KAAK;gBACnB,KAAK,EAAE,IAAA,mBAAU,GAAE;aACpB,CAAC,CAAA;YAEF,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,eAAM,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAA;YAE9C,SAAE,CAAC,MAAM,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAA;YAC5C,mEAAmE;YACnE,IAAA,cAAI,EAAC,MAAM,CAAC,CAAA;QACd,CAAC,CAAC,CAAA;IACJ,CAAC;IAEM,KAAK,CAAC,MAAM;QACjB,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;YACnC,OAAO,EAAE,CAAA;QACX,CAAC,CAAC,CAAA;IACJ,CAAC;IAEO,cAAc,CAAC,MAAmB;QACxC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;YAC9B,IAAI,KAAK,EAAE;gBACT,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,iDAAkD,KAAe,CAAC,OAAO,EAAE,CAAC,CAAA;gBAC9F,OAAM;aACP;YAED,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,gDAAgD,CAAC,CAAA;QACrE,CAAC,CAAC,CAAA;IACJ,CAAC;CACF;AApMD,4CAoMC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const successfulLoginPage = "<!DOCTYPE html>\n<html>\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n<head>\n <style>\n body {\n background-color: #040822;\n font-family: Figtree;\n }\n\n h1 {\n font-size: 40px;\n font-weight: 800;\n line-height: 42px;\n letter-spacing: -0.4px;\n }\n\n p {\n font-size: 16px;\n font-weight: 400;\n line-height: 21.1px;\n letter-spacing: 0.2px;\n margin-bottom: 2.2px;\n }\n\n a {\n font-weight: 600;\n color: #1D58FC;\n text-decoration: none;\n }\n\n .logo-container {\n margin-top: 20px;\n margin-left: 68px;\n width: 130.85px;\n height: 24px;\n }\n\n .outer-container {\n width: 360px;\n height: 296px;\n background-color: white;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n\n .inner-container {\n width: 296px;\n height: 84px;\n position: relative;\n top: 24px;\n left: 2px;\n text-align: left;\n }\n </style>\n</head>\n\n<body>\n <div class=\"logo-container\">\n <svg width=\"130.8\" height=\"24\" viewBox=\"0 0 132 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g id=\"Affinidi logo\">\n <g id=\"wordmark\">\n <path d=\"M50.3841 10.8008C50.3172 10.532 50.2413 10.2683 50.1551 10.0137C49.7731 8.88819 49.1352 7.99297 48.2386 7.32541C47.3421 6.65784 46.1318 6.32471 44.6063 6.32471C43.2339 6.32471 41.9939 6.63984 40.8878 7.26881C39.7816 7.89778 38.9044 8.76986 38.2561 9.88632C37.6078 11.0015 37.2837 12.3032 37.2837 13.7901C37.2837 15.277 37.6027 16.5221 38.2419 17.6372C38.8812 18.7524 39.7391 19.6245 40.8157 20.2547C41.8923 20.8837 43.0795 21.1988 44.3773 21.1988C45.5594 21.1988 46.5549 20.9647 47.3666 20.4978C48.1769 20.0309 48.8252 19.4251 49.3114 18.6817C49.7976 17.9382 50.1551 17.133 50.3841 16.2648L50.3815 20.9145H53.5843L53.5856 6.76484H50.3815L50.3828 10.8021L50.3841 10.8008ZM49.7976 16.2481C49.4065 16.9735 48.8342 17.5395 48.0817 17.9498C47.328 18.3601 46.4173 18.5646 45.3497 18.5646C44.4146 18.5646 43.5863 18.364 42.8609 17.9639C42.1354 17.5639 41.5695 17.0018 41.1591 16.2764C40.7488 15.5522 40.5443 14.7226 40.5443 13.7875C40.5443 12.3572 40.9636 11.1944 41.8023 10.2979C42.6409 9.4014 43.823 8.95379 45.3484 8.95379C46.416 8.95379 47.3215 9.1493 48.065 9.54032C48.8084 9.93134 49.3808 10.4844 49.7808 11.1996C50.1809 11.9147 50.3815 12.7778 50.3815 13.7888C50.3815 14.7046 50.186 15.5239 49.795 16.2481H49.7976Z\" fill=\"white\" style=\"fill:white;fill:white;fill-opacity:1;\"/>\n <path d=\"M71.8324 1.89201C71.0414 2.23544 70.4407 2.82454 70.0304 3.5487C69.6201 4.27414 69.4155 5.07933 69.4155 6.2228V6.77042H62.3219V6.58038C62.3219 5.91281 62.4312 5.40346 62.6512 5.04974C62.8698 4.69731 63.1798 4.50438 63.5811 4.36161C63.9812 4.21883 64.4391 4.1673 64.9536 4.18531H66.7556V1.37366H64.3812C63.2943 1.37366 62.3553 1.54473 61.5643 1.88816C60.7733 2.23158 60.1726 2.76537 59.7623 3.48953C59.352 4.21497 59.1475 5.14879 59.1475 6.29226V6.76785H56.3447V9.38053H59.1475V20.9065H62.3219V9.38053H69.4155V20.9065H72.59V9.38053H76.9954V6.76785H72.59V6.50577C72.59 5.83821 72.6993 5.45234 72.9193 5.08962C73.1379 4.72818 73.4479 4.47994 73.8492 4.34617C74.2493 4.2124 74.7072 4.1558 75.2217 4.1751H76.9954V1.37366H74.6789C73.5727 1.37366 72.6234 1.54473 71.8324 1.88816V1.89201Z\" fill=\"white\" style=\"fill:white;fill:white;fill-opacity:1;\"/>\n <path d=\"M82.959 1.37265H79.7564V4.18882H82.959V1.37265Z\" fill=\"white\" style=\"fill:white;fill:white;fill-opacity:1;\"/>\n <path d=\"M82.9574 6.76382H79.7534V20.9065H82.9574V6.76382Z\" fill=\"white\" style=\"fill:white;fill:white;fill-opacity:1;\"/>\n <path d=\"M98.9754 7.71959C98.4699 7.25268 97.8693 6.9041 97.1734 6.67515C96.4775 6.4462 95.7187 6.33173 94.8993 6.33173C94.0221 6.33173 93.2208 6.4745 92.4966 6.76133C91.7712 7.04688 91.1422 7.44304 90.6084 7.94854C90.0746 8.45403 89.645 9.02641 89.3209 9.66439C89.1434 10.0155 89.0006 10.3757 88.8913 10.7461V6.76133H85.7168V20.9145H88.8913V12.4105C89.0328 11.9758 89.2514 11.5667 89.5485 11.1796C90.0245 10.5596 90.6393 10.0541 91.393 9.6631C92.1455 9.27208 92.9802 9.07657 93.8961 9.07657C95.0974 9.07657 95.9785 9.35826 96.5419 9.92035C97.104 10.4824 97.3856 11.3455 97.3856 12.5096V20.9145H100.56V11.8793C100.56 10.9455 100.421 10.1352 100.146 9.4483C99.8694 8.76144 99.4784 8.1852 98.9729 7.7183L98.9754 7.71959Z\" fill=\"white\" style=\"fill:white;fill:white;fill-opacity:1;\"/>\n <path d=\"M106.516 1.37466H103.318V4.17739H106.516V1.37466Z\" fill=\"white\" style=\"fill:white;fill:white;fill-opacity:1;\"/>\n <path d=\"M106.523 6.76584H103.319V20.9145H106.523V6.76584Z\" fill=\"white\" style=\"fill:white;fill:white;fill-opacity:1;\"/>\n <path d=\"M122.381 10.8297C122.161 9.95637 121.818 9.18719 121.351 8.52349C120.874 7.84693 120.225 7.31314 119.406 6.92212C118.585 6.5311 117.576 6.33559 116.374 6.33559C115.002 6.33559 113.786 6.65072 112.728 7.27969C111.669 7.90867 110.831 8.78074 110.211 9.8972C109.591 11.0124 109.281 12.3141 109.281 13.801C109.281 15.2879 109.596 16.5329 110.225 17.6481C110.854 18.7633 111.708 19.6354 112.784 20.2656C113.861 20.8946 115.059 21.2097 116.374 21.2097C117.556 21.2097 118.553 20.9756 119.364 20.5087C120.174 20.0418 120.822 19.436 121.308 18.6925C121.795 17.9491 122.152 17.1439 122.381 16.2757V17.5195V20.9145H125.585V1.37466H122.381V10.8297ZM121.795 16.2603C121.404 16.9857 120.831 17.5516 120.079 17.962C119.325 18.3723 118.414 18.5768 117.347 18.5768C116.412 18.5768 115.583 18.3761 114.858 17.9761C114.132 17.5761 113.567 17.014 113.156 16.2886C112.746 15.5644 112.541 14.7348 112.541 13.7997C112.541 12.3694 112.961 11.2015 113.799 10.2959C114.638 9.39042 115.82 8.93766 117.346 8.93766C118.413 8.93766 119.319 9.13832 120.063 9.53834C120.807 9.93836 121.379 10.4966 121.779 11.2117C122.179 11.9269 122.38 12.79 122.38 13.801C122.38 14.7168 122.184 15.5361 121.793 16.2603H121.795Z\" fill=\"white\" style=\"fill:white;fill:white;fill-opacity:1;\"/>\n <path d=\"M131.552 1.36462H128.345V4.19537H131.552V1.36462Z\" fill=\"white\" style=\"fill:white;fill:white;fill-opacity:1;\"/>\n <path d=\"M131.547 6.76584H128.343V20.9135H131.547V6.76584Z\" fill=\"white\" style=\"fill:white;fill:white;fill-opacity:1;\"/>\n </g>\n <g id=\"icon\">\n <path d=\"M3.92255 20.2815C6.10788 22.5723 9.19101 24 12.606 24C16.021 24 19.1041 22.5723 21.2894 20.2815H3.92126H3.92255Z\" fill=\"white\" style=\"fill:white;fill:white;fill-opacity:1;\"/>\n <path d=\"M21.2908 6.76083H1.8093C1.25107 7.90945 0.870337 9.16097 0.703125 10.4794H21.2908V6.76083Z\" fill=\"white\" style=\"fill:white;fill:white;fill-opacity:1;\"/>\n <path d=\"M21.2906 3.71853C19.1053 1.42773 16.0222 0 12.6072 0C9.19222 0 6.1091 1.42773 3.92377 3.71853H21.2906Z\" fill=\"white\" style=\"fill:white;fill:white;fill-opacity:1;\"/>\n <path d=\"M21.2908 13.5206H0.703125C0.870337 14.839 1.25107 16.0905 1.8093 17.2392H21.2908V13.5206Z\" fill=\"white\" style=\"fill:white;fill:white;fill-opacity:1;\"/>\n <path d=\"M23.4053 6.76083C23.9636 7.90945 24.3443 9.16097 24.5115 10.4794H29.2912V6.76083H23.4053Z\" fill=\"white\" style=\"fill:white;fill:white;fill-opacity:1;\"/>\n <path d=\"M29.291 20.2815H21.2906V24H29.291V20.2815Z\" fill=\"white\" style=\"fill:white;fill:white;fill-opacity:1;\"/>\n <path d=\"M23.4053 17.2392H29.2912V13.5206H24.5115C24.3443 14.839 23.9636 16.0905 23.4053 17.2392Z\" fill=\"white\" style=\"fill:white;fill:white;fill-opacity:1;\"/>\n <path d=\"M29.291 0H21.2906V3.71853H29.291V0Z\" fill=\"white\" style=\"fill:white;fill:white;fill-opacity:1;\"/>\n <path d=\"M24.5113 10.4785C24.3441 9.16015 23.9634 7.90863 23.4052 6.76002C22.8598 5.63712 22.1434 4.61199 21.2906 3.71805V20.281C22.1434 19.3871 22.8585 18.3619 23.4052 17.2391C23.9634 16.0904 24.3441 14.8389 24.5113 13.5205C24.5744 13.0227 24.6065 12.5147 24.6065 11.9989C24.6065 11.4831 24.5744 10.9763 24.5113 10.4773V10.4785Z\" fill=\"#1D58FC\" style=\"fill:#1D58FC;fill:color(display-p3 0.1137 0.3451 0.9882);fill-opacity:1;\"/>\n </g>\n </g>\n </svg>\n </div>\n\n <div class=\"outer-container\">\n <div class=\"inner-container\">\n <h1>Logged in successfully.</h1>\n\n <p>\n Head back to the command prompt or terminal to continue using our services.<br>You can also access our services from the <a href=\"https://portal.affinidi.com\" target=\"_blank\">Affindi Portal</a>.\n </p>\n </div>\n </div>\n</body>\n</html>\n";
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.successfulLoginPage = void 0;
|
|
4
|
-
exports.successfulLoginPage = `<!DOCTYPE html>
|
|
5
|
-
<html>
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<head>
|
|
8
|
-
<style>
|
|
9
|
-
body {
|
|
10
|
-
background-color: #040822;
|
|
11
|
-
font-family: Figtree;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
h1 {
|
|
15
|
-
font-size: 40px;
|
|
16
|
-
font-weight: 800;
|
|
17
|
-
line-height: 42px;
|
|
18
|
-
letter-spacing: -0.4px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
p {
|
|
22
|
-
font-size: 16px;
|
|
23
|
-
font-weight: 400;
|
|
24
|
-
line-height: 21.1px;
|
|
25
|
-
letter-spacing: 0.2px;
|
|
26
|
-
margin-bottom: 2.2px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
a {
|
|
30
|
-
font-weight: 600;
|
|
31
|
-
color: #1D58FC;
|
|
32
|
-
text-decoration: none;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.logo-container {
|
|
36
|
-
margin-top: 20px;
|
|
37
|
-
margin-left: 68px;
|
|
38
|
-
width: 130.85px;
|
|
39
|
-
height: 24px;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.outer-container {
|
|
43
|
-
width: 360px;
|
|
44
|
-
height: 296px;
|
|
45
|
-
background-color: white;
|
|
46
|
-
position: absolute;
|
|
47
|
-
top: 50%;
|
|
48
|
-
left: 50%;
|
|
49
|
-
transform: translate(-50%, -50%);
|
|
50
|
-
border-radius: 8px;
|
|
51
|
-
display: flex;
|
|
52
|
-
flex-direction: column;
|
|
53
|
-
align-items: center;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.inner-container {
|
|
57
|
-
width: 296px;
|
|
58
|
-
height: 84px;
|
|
59
|
-
position: relative;
|
|
60
|
-
top: 24px;
|
|
61
|
-
left: 2px;
|
|
62
|
-
text-align: left;
|
|
63
|
-
}
|
|
64
|
-
</style>
|
|
65
|
-
</head>
|
|
66
|
-
|
|
67
|
-
<body>
|
|
68
|
-
<div class="logo-container">
|
|
69
|
-
<svg width="130.8" height="24" viewBox="0 0 132 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
70
|
-
<g id="Affinidi logo">
|
|
71
|
-
<g id="wordmark">
|
|
72
|
-
<path d="M50.3841 10.8008C50.3172 10.532 50.2413 10.2683 50.1551 10.0137C49.7731 8.88819 49.1352 7.99297 48.2386 7.32541C47.3421 6.65784 46.1318 6.32471 44.6063 6.32471C43.2339 6.32471 41.9939 6.63984 40.8878 7.26881C39.7816 7.89778 38.9044 8.76986 38.2561 9.88632C37.6078 11.0015 37.2837 12.3032 37.2837 13.7901C37.2837 15.277 37.6027 16.5221 38.2419 17.6372C38.8812 18.7524 39.7391 19.6245 40.8157 20.2547C41.8923 20.8837 43.0795 21.1988 44.3773 21.1988C45.5594 21.1988 46.5549 20.9647 47.3666 20.4978C48.1769 20.0309 48.8252 19.4251 49.3114 18.6817C49.7976 17.9382 50.1551 17.133 50.3841 16.2648L50.3815 20.9145H53.5843L53.5856 6.76484H50.3815L50.3828 10.8021L50.3841 10.8008ZM49.7976 16.2481C49.4065 16.9735 48.8342 17.5395 48.0817 17.9498C47.328 18.3601 46.4173 18.5646 45.3497 18.5646C44.4146 18.5646 43.5863 18.364 42.8609 17.9639C42.1354 17.5639 41.5695 17.0018 41.1591 16.2764C40.7488 15.5522 40.5443 14.7226 40.5443 13.7875C40.5443 12.3572 40.9636 11.1944 41.8023 10.2979C42.6409 9.4014 43.823 8.95379 45.3484 8.95379C46.416 8.95379 47.3215 9.1493 48.065 9.54032C48.8084 9.93134 49.3808 10.4844 49.7808 11.1996C50.1809 11.9147 50.3815 12.7778 50.3815 13.7888C50.3815 14.7046 50.186 15.5239 49.795 16.2481H49.7976Z" fill="white" style="fill:white;fill:white;fill-opacity:1;"/>
|
|
73
|
-
<path d="M71.8324 1.89201C71.0414 2.23544 70.4407 2.82454 70.0304 3.5487C69.6201 4.27414 69.4155 5.07933 69.4155 6.2228V6.77042H62.3219V6.58038C62.3219 5.91281 62.4312 5.40346 62.6512 5.04974C62.8698 4.69731 63.1798 4.50438 63.5811 4.36161C63.9812 4.21883 64.4391 4.1673 64.9536 4.18531H66.7556V1.37366H64.3812C63.2943 1.37366 62.3553 1.54473 61.5643 1.88816C60.7733 2.23158 60.1726 2.76537 59.7623 3.48953C59.352 4.21497 59.1475 5.14879 59.1475 6.29226V6.76785H56.3447V9.38053H59.1475V20.9065H62.3219V9.38053H69.4155V20.9065H72.59V9.38053H76.9954V6.76785H72.59V6.50577C72.59 5.83821 72.6993 5.45234 72.9193 5.08962C73.1379 4.72818 73.4479 4.47994 73.8492 4.34617C74.2493 4.2124 74.7072 4.1558 75.2217 4.1751H76.9954V1.37366H74.6789C73.5727 1.37366 72.6234 1.54473 71.8324 1.88816V1.89201Z" fill="white" style="fill:white;fill:white;fill-opacity:1;"/>
|
|
74
|
-
<path d="M82.959 1.37265H79.7564V4.18882H82.959V1.37265Z" fill="white" style="fill:white;fill:white;fill-opacity:1;"/>
|
|
75
|
-
<path d="M82.9574 6.76382H79.7534V20.9065H82.9574V6.76382Z" fill="white" style="fill:white;fill:white;fill-opacity:1;"/>
|
|
76
|
-
<path d="M98.9754 7.71959C98.4699 7.25268 97.8693 6.9041 97.1734 6.67515C96.4775 6.4462 95.7187 6.33173 94.8993 6.33173C94.0221 6.33173 93.2208 6.4745 92.4966 6.76133C91.7712 7.04688 91.1422 7.44304 90.6084 7.94854C90.0746 8.45403 89.645 9.02641 89.3209 9.66439C89.1434 10.0155 89.0006 10.3757 88.8913 10.7461V6.76133H85.7168V20.9145H88.8913V12.4105C89.0328 11.9758 89.2514 11.5667 89.5485 11.1796C90.0245 10.5596 90.6393 10.0541 91.393 9.6631C92.1455 9.27208 92.9802 9.07657 93.8961 9.07657C95.0974 9.07657 95.9785 9.35826 96.5419 9.92035C97.104 10.4824 97.3856 11.3455 97.3856 12.5096V20.9145H100.56V11.8793C100.56 10.9455 100.421 10.1352 100.146 9.4483C99.8694 8.76144 99.4784 8.1852 98.9729 7.7183L98.9754 7.71959Z" fill="white" style="fill:white;fill:white;fill-opacity:1;"/>
|
|
77
|
-
<path d="M106.516 1.37466H103.318V4.17739H106.516V1.37466Z" fill="white" style="fill:white;fill:white;fill-opacity:1;"/>
|
|
78
|
-
<path d="M106.523 6.76584H103.319V20.9145H106.523V6.76584Z" fill="white" style="fill:white;fill:white;fill-opacity:1;"/>
|
|
79
|
-
<path d="M122.381 10.8297C122.161 9.95637 121.818 9.18719 121.351 8.52349C120.874 7.84693 120.225 7.31314 119.406 6.92212C118.585 6.5311 117.576 6.33559 116.374 6.33559C115.002 6.33559 113.786 6.65072 112.728 7.27969C111.669 7.90867 110.831 8.78074 110.211 9.8972C109.591 11.0124 109.281 12.3141 109.281 13.801C109.281 15.2879 109.596 16.5329 110.225 17.6481C110.854 18.7633 111.708 19.6354 112.784 20.2656C113.861 20.8946 115.059 21.2097 116.374 21.2097C117.556 21.2097 118.553 20.9756 119.364 20.5087C120.174 20.0418 120.822 19.436 121.308 18.6925C121.795 17.9491 122.152 17.1439 122.381 16.2757V17.5195V20.9145H125.585V1.37466H122.381V10.8297ZM121.795 16.2603C121.404 16.9857 120.831 17.5516 120.079 17.962C119.325 18.3723 118.414 18.5768 117.347 18.5768C116.412 18.5768 115.583 18.3761 114.858 17.9761C114.132 17.5761 113.567 17.014 113.156 16.2886C112.746 15.5644 112.541 14.7348 112.541 13.7997C112.541 12.3694 112.961 11.2015 113.799 10.2959C114.638 9.39042 115.82 8.93766 117.346 8.93766C118.413 8.93766 119.319 9.13832 120.063 9.53834C120.807 9.93836 121.379 10.4966 121.779 11.2117C122.179 11.9269 122.38 12.79 122.38 13.801C122.38 14.7168 122.184 15.5361 121.793 16.2603H121.795Z" fill="white" style="fill:white;fill:white;fill-opacity:1;"/>
|
|
80
|
-
<path d="M131.552 1.36462H128.345V4.19537H131.552V1.36462Z" fill="white" style="fill:white;fill:white;fill-opacity:1;"/>
|
|
81
|
-
<path d="M131.547 6.76584H128.343V20.9135H131.547V6.76584Z" fill="white" style="fill:white;fill:white;fill-opacity:1;"/>
|
|
82
|
-
</g>
|
|
83
|
-
<g id="icon">
|
|
84
|
-
<path d="M3.92255 20.2815C6.10788 22.5723 9.19101 24 12.606 24C16.021 24 19.1041 22.5723 21.2894 20.2815H3.92126H3.92255Z" fill="white" style="fill:white;fill:white;fill-opacity:1;"/>
|
|
85
|
-
<path d="M21.2908 6.76083H1.8093C1.25107 7.90945 0.870337 9.16097 0.703125 10.4794H21.2908V6.76083Z" fill="white" style="fill:white;fill:white;fill-opacity:1;"/>
|
|
86
|
-
<path d="M21.2906 3.71853C19.1053 1.42773 16.0222 0 12.6072 0C9.19222 0 6.1091 1.42773 3.92377 3.71853H21.2906Z" fill="white" style="fill:white;fill:white;fill-opacity:1;"/>
|
|
87
|
-
<path d="M21.2908 13.5206H0.703125C0.870337 14.839 1.25107 16.0905 1.8093 17.2392H21.2908V13.5206Z" fill="white" style="fill:white;fill:white;fill-opacity:1;"/>
|
|
88
|
-
<path d="M23.4053 6.76083C23.9636 7.90945 24.3443 9.16097 24.5115 10.4794H29.2912V6.76083H23.4053Z" fill="white" style="fill:white;fill:white;fill-opacity:1;"/>
|
|
89
|
-
<path d="M29.291 20.2815H21.2906V24H29.291V20.2815Z" fill="white" style="fill:white;fill:white;fill-opacity:1;"/>
|
|
90
|
-
<path d="M23.4053 17.2392H29.2912V13.5206H24.5115C24.3443 14.839 23.9636 16.0905 23.4053 17.2392Z" fill="white" style="fill:white;fill:white;fill-opacity:1;"/>
|
|
91
|
-
<path d="M29.291 0H21.2906V3.71853H29.291V0Z" fill="white" style="fill:white;fill:white;fill-opacity:1;"/>
|
|
92
|
-
<path d="M24.5113 10.4785C24.3441 9.16015 23.9634 7.90863 23.4052 6.76002C22.8598 5.63712 22.1434 4.61199 21.2906 3.71805V20.281C22.1434 19.3871 22.8585 18.3619 23.4052 17.2391C23.9634 16.0904 24.3441 14.8389 24.5113 13.5205C24.5744 13.0227 24.6065 12.5147 24.6065 11.9989C24.6065 11.4831 24.5744 10.9763 24.5113 10.4773V10.4785Z" fill="#1D58FC" style="fill:#1D58FC;fill:color(display-p3 0.1137 0.3451 0.9882);fill-opacity:1;"/>
|
|
93
|
-
</g>
|
|
94
|
-
</g>
|
|
95
|
-
</svg>
|
|
96
|
-
</div>
|
|
97
|
-
|
|
98
|
-
<div class="outer-container">
|
|
99
|
-
<div class="inner-container">
|
|
100
|
-
<h1>Logged in successfully.</h1>
|
|
101
|
-
|
|
102
|
-
<p>
|
|
103
|
-
Head back to the command prompt or terminal to continue using our services.<br>You can also access our services from the <a href="https://portal.affinidi.com" target="_blank">Affindi Portal</a>.
|
|
104
|
-
</p>
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
107
|
-
</body>
|
|
108
|
-
</html>
|
|
109
|
-
`;
|
|
110
|
-
//# sourceMappingURL=successful-login-page.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"successful-login-page.js","sourceRoot":"","sources":["../../../../../src/services/affinidi/auth/providers/successful-login-page.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyGlC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/services/affinidi/auth/providers/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
export type UserToken = {
|
|
2
|
-
access_token: string;
|
|
3
|
-
expires_in: number;
|
|
4
|
-
id_token: string;
|
|
5
|
-
refresh_token: string;
|
|
6
|
-
scope: string;
|
|
7
|
-
token_type: string;
|
|
8
|
-
};
|
|
9
|
-
export type ProjectToken = {
|
|
10
|
-
projectId: string;
|
|
11
|
-
projectName: string;
|
|
12
|
-
projectAccessToken: string;
|
|
13
|
-
expiresIn: number;
|
|
14
|
-
scope: string;
|
|
15
|
-
};
|
|
16
|
-
export type Principal = {
|
|
17
|
-
principalId: string;
|
|
18
|
-
principalType: string;
|
|
19
|
-
};
|
|
20
|
-
export interface CredSetterGetter {
|
|
21
|
-
clear: () => void;
|
|
22
|
-
getUserToken: () => UserToken;
|
|
23
|
-
setUserToken: (token: UserToken) => void;
|
|
24
|
-
getProjectToken: () => ProjectToken;
|
|
25
|
-
setProjectToken: (token: ProjectToken) => void;
|
|
26
|
-
setPrincipal: (principal: Principal) => void;
|
|
27
|
-
getPrincipal: () => Principal;
|
|
28
|
-
}
|
|
29
|
-
declare class TokenService {
|
|
30
|
-
private readonly store;
|
|
31
|
-
constructor(storer: CredSetterGetter);
|
|
32
|
-
getUserToken: () => UserToken;
|
|
33
|
-
getProjectToken: () => ProjectToken;
|
|
34
|
-
getPrincipal: () => Principal;
|
|
35
|
-
setPrincipal: (principal: Principal) => void;
|
|
36
|
-
setUserToken: (token: UserToken) => void;
|
|
37
|
-
setProjectToken: (token: unknown, projectId: string, projectName: string) => void;
|
|
38
|
-
clear: () => void;
|
|
39
|
-
}
|
|
40
|
-
export type TokenServiceClass = TokenService;
|
|
41
|
-
export declare class MockStorer implements CredSetterGetter {
|
|
42
|
-
private userToken;
|
|
43
|
-
private projectToken;
|
|
44
|
-
private principal;
|
|
45
|
-
clear(): void;
|
|
46
|
-
getUserToken(): UserToken;
|
|
47
|
-
setUserToken(token: UserToken): void;
|
|
48
|
-
getProjectToken(): ProjectToken;
|
|
49
|
-
setProjectToken(token: ProjectToken): void;
|
|
50
|
-
setPrincipal(principal: Principal): void;
|
|
51
|
-
getPrincipal(): Principal;
|
|
52
|
-
}
|
|
53
|
-
export declare const tokenService: TokenService;
|
|
54
|
-
export {};
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tokenService = exports.MockStorer = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
/* eslint-disable max-classes-per-file */
|
|
6
|
-
const os = tslib_1.__importStar(require("os"));
|
|
7
|
-
const path = tslib_1.__importStar(require("path"));
|
|
8
|
-
const conf_1 = tslib_1.__importDefault(require("conf"));
|
|
9
|
-
class TokenService {
|
|
10
|
-
constructor(storer) {
|
|
11
|
-
this.getUserToken = () => {
|
|
12
|
-
return this.store.getUserToken();
|
|
13
|
-
};
|
|
14
|
-
this.getProjectToken = () => {
|
|
15
|
-
return this.store.getProjectToken();
|
|
16
|
-
};
|
|
17
|
-
this.getPrincipal = () => {
|
|
18
|
-
return this.store.getPrincipal();
|
|
19
|
-
};
|
|
20
|
-
this.setPrincipal = (principal) => {
|
|
21
|
-
this.store.setPrincipal(principal);
|
|
22
|
-
};
|
|
23
|
-
this.setUserToken = (token) => {
|
|
24
|
-
this.store.setUserToken(token);
|
|
25
|
-
};
|
|
26
|
-
this.setProjectToken = (token, projectId, projectName) => {
|
|
27
|
-
const project = JSON.parse(JSON.stringify(token));
|
|
28
|
-
const projectToken = {
|
|
29
|
-
projectName,
|
|
30
|
-
projectId,
|
|
31
|
-
projectAccessToken: project.accessToken,
|
|
32
|
-
expiresIn: project.expiresIn,
|
|
33
|
-
scope: project.scope,
|
|
34
|
-
};
|
|
35
|
-
this.store.setProjectToken(projectToken);
|
|
36
|
-
};
|
|
37
|
-
this.clear = () => {
|
|
38
|
-
this.store.clear();
|
|
39
|
-
};
|
|
40
|
-
this.store = storer;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
const credentialConfig = new conf_1.default({
|
|
44
|
-
cwd: path.join(os.homedir(), '.affinidi'),
|
|
45
|
-
configName: 'oAuthCred',
|
|
46
|
-
});
|
|
47
|
-
const storer = {
|
|
48
|
-
clear: () => {
|
|
49
|
-
credentialConfig.clear();
|
|
50
|
-
},
|
|
51
|
-
getUserToken: () => {
|
|
52
|
-
return credentialConfig.get('userToken');
|
|
53
|
-
},
|
|
54
|
-
setUserToken: (token) => {
|
|
55
|
-
credentialConfig.set('userToken', token);
|
|
56
|
-
},
|
|
57
|
-
getProjectToken: () => {
|
|
58
|
-
return credentialConfig.get('projectToken');
|
|
59
|
-
},
|
|
60
|
-
setProjectToken: (token) => {
|
|
61
|
-
credentialConfig.set('projectToken', token);
|
|
62
|
-
},
|
|
63
|
-
setPrincipal: (principal) => {
|
|
64
|
-
credentialConfig.set('principal', principal);
|
|
65
|
-
},
|
|
66
|
-
getPrincipal: () => {
|
|
67
|
-
return credentialConfig.get('principal');
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
const initUserToken = {
|
|
71
|
-
access_token: '',
|
|
72
|
-
expires_in: 0,
|
|
73
|
-
id_token: '',
|
|
74
|
-
refresh_token: '',
|
|
75
|
-
scope: '',
|
|
76
|
-
token_type: '',
|
|
77
|
-
};
|
|
78
|
-
const initPrincipal = {
|
|
79
|
-
principalId: '',
|
|
80
|
-
principalType: '',
|
|
81
|
-
};
|
|
82
|
-
const initProjectToken = {
|
|
83
|
-
projectName: '',
|
|
84
|
-
projectId: '',
|
|
85
|
-
projectAccessToken: '',
|
|
86
|
-
expiresIn: 0,
|
|
87
|
-
scope: '',
|
|
88
|
-
};
|
|
89
|
-
class MockStorer {
|
|
90
|
-
constructor() {
|
|
91
|
-
this.userToken = { ...initUserToken };
|
|
92
|
-
this.projectToken = { ...initProjectToken };
|
|
93
|
-
this.principal = { ...initPrincipal };
|
|
94
|
-
}
|
|
95
|
-
clear() {
|
|
96
|
-
this.userToken = { ...initUserToken };
|
|
97
|
-
this.projectToken = { ...initProjectToken };
|
|
98
|
-
this.principal = { ...initPrincipal };
|
|
99
|
-
}
|
|
100
|
-
getUserToken() {
|
|
101
|
-
return this.userToken;
|
|
102
|
-
}
|
|
103
|
-
setUserToken(token) {
|
|
104
|
-
this.userToken = token;
|
|
105
|
-
}
|
|
106
|
-
getProjectToken() {
|
|
107
|
-
return this.projectToken;
|
|
108
|
-
}
|
|
109
|
-
setProjectToken(token) {
|
|
110
|
-
this.projectToken = token;
|
|
111
|
-
}
|
|
112
|
-
setPrincipal(principal) {
|
|
113
|
-
this.principal = principal;
|
|
114
|
-
}
|
|
115
|
-
getPrincipal() {
|
|
116
|
-
return this.principal;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
exports.MockStorer = MockStorer;
|
|
120
|
-
exports.tokenService = new TokenService(process.env.NODE_ENV === 'test' ? new MockStorer() : storer);
|
|
121
|
-
//# sourceMappingURL=token.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token.js","sourceRoot":"","sources":["../../../../src/services/affinidi/auth/token.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ters';
|
|
2
|
-
export type Environment = 'dev' | 'prod';
|
|
3
|
-
export type ClientSDKConfig = {
|
|
4
|
-
logger?: LoggerAdapter;
|
|
5
|
-
logLevel?: LogLevel;
|
|
6
|
-
environment?: Environment;
|
|
7
|
-
authConfig: {
|
|
8
|
-
clientId: string;
|
|
9
|
-
host: string;
|
|
10
|
-
};
|
|
11
|
-
component: 'Cli' | 'VsCodeExtension';
|
|
12
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/services/affinidi/config.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/affinidi/errors/index.ts"],"names":[],"mappings":";;;;AAAA,mDAAiD;AACjD,iCAAkC;AAClC,0DAAyB;AACzB,yDAA+C;AAElC,QAAA,gBAAgB,GAAG,+EAA+E,CAAA;AAClG,QAAA,yBAAyB,GACpC,+FAA+F,CAAA;AAEjG,+DAA+D;AAC/D,MAAM,wBAAwB,GAAG,CAAC,QAAa,EAAU,EAAE;IACzD,QAAQ,QAAQ,CAAC,MAAM,EAAE;QACvB,KAAK,+BAAW,CAAC,SAAS,CAAC;QAC3B,KAAK,+BAAW,CAAC,YAAY;YAC3B,OAAO,mJAAmJ,CAAA;QAC5J,KAAK,+BAAW,CAAC,SAAS;YACxB,OAAO,oGAAoG,CAAA;QAC7G,KAAK,+BAAW,CAAC,iBAAiB;YAChC,OAAO,8DAA8D,CAAA;QACvE,KAAK,+BAAW,CAAC,WAAW;YAC1B,QAAQ,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE;gBAC3B,KAAK,mBAAmB;oBACtB,OAAO,0EAA0E,CAAA;gBACnF,OAAO,CAAC,CAAC;oBACP,IAAI,OAAO,GAAG,0BAA0B,CAAA;oBACxC,OAAO;wBACL,wGAAwG,CAAA;oBAC1G,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CA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AG,CAAC,KAAK,KAAK,aAAa,CAAC,CAAA;QAErG,IAAI,YAAY,EAAE;YAChB,MAAM,IAAI,KAAK,CAAC,wBAAgB,CAAC,CAAA;SAClC;QAED,IAAI,KAAK,CAAC,QAAQ,EAAE;YAClB,MAAM,IAAI,iBAAQ,CAChB,0BAA0B;gBACxB,CAAC,CAAC,0BAA0B,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,wBAAwB,CAAC,KAAK,CAAC,QAAQ,CAAC;gBACxF,CAAC,CAAC,wBAAwB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAC7C,CAAA;SACF;KACF;IAED,MAAM,KAAK,CAAA;AACb,CAAC;AAxBD,gDAwBC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { AuthResult, AuthSDK } from './auth';
|
|
2
|
-
import { tokenService } from './auth/token';
|
|
3
|
-
import { ClientSDKConfig } from './config';
|
|
4
|
-
export declare class ClientSDK {
|
|
5
|
-
private readonly clientId;
|
|
6
|
-
private readonly host;
|
|
7
|
-
private readonly environment;
|
|
8
|
-
private readonly logger;
|
|
9
|
-
readonly auth: AuthSDK;
|
|
10
|
-
readonly config: typeof tokenService;
|
|
11
|
-
constructor(config: ClientSDKConfig);
|
|
12
|
-
/**
|
|
13
|
-
* Onboards a builder and generates a project-scoped token
|
|
14
|
-
* @returns Project-Scoped token
|
|
15
|
-
*/
|
|
16
|
-
login(params: {
|
|
17
|
-
projectId?: string;
|
|
18
|
-
userAccessToken?: string;
|
|
19
|
-
hideProjectHints?: boolean;
|
|
20
|
-
}): Promise<AuthResult>;
|
|
21
|
-
logout(): Promise<void>;
|
|
22
|
-
}
|
|
23
|
-
declare const clientSDK: ClientSDK;
|
|
24
|
-
export { clientSDK };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.clientSDK = exports.ClientSDK = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const process = tslib_1.__importStar(require("process"));
|
|
6
|
-
const adapters_1 = require("./adapters");
|
|
7
|
-
const auth_1 = require("./auth");
|
|
8
|
-
const token_1 = require("./auth/token");
|
|
9
|
-
// This is a class of the ClientSDK. The ClientSDK is currently a work in progress,
|
|
10
|
-
// and the Affinidi CLI reuses components from the project.
|
|
11
|
-
//
|
|
12
|
-
// Upon completion of the ClientSDK, the implementation should be migrated back to it.
|
|
13
|
-
class ClientSDK {
|
|
14
|
-
constructor(config) {
|
|
15
|
-
this.clientId = config.authConfig.clientId;
|
|
16
|
-
this.host = config.authConfig.host;
|
|
17
|
-
this.environment = config.environment || 'dev';
|
|
18
|
-
this.logger = config.logger || new adapters_1.ConsoleLoggerAdapter(config.logLevel || 'info');
|
|
19
|
-
this.config = token_1.tokenService;
|
|
20
|
-
this.auth = new auth_1.Auth({
|
|
21
|
-
logger: this.logger,
|
|
22
|
-
clientId: this.clientId,
|
|
23
|
-
host: this.host,
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Onboards a builder and generates a project-scoped token
|
|
28
|
-
* @returns Project-Scoped token
|
|
29
|
-
*/
|
|
30
|
-
login(params) {
|
|
31
|
-
return this.auth.login(params);
|
|
32
|
-
}
|
|
33
|
-
logout() {
|
|
34
|
-
this.config.clear();
|
|
35
|
-
return this.auth.logout();
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
exports.ClientSDK = ClientSDK;
|
|
39
|
-
const clientId = process.env.AFFINIDI_CLI_ENVIRONMENT === 'dev' || process.env.AFFINIDI_CLI_ENVIRONMENT === 'test'
|
|
40
|
-
? '7ea59d10-0546-400f-ba0a-862fa119465e'
|
|
41
|
-
: '5540a110-5505-4127-9bd7-301122f99ce1';
|
|
42
|
-
const host = process.env.AFFINIDI_CLI_ENVIRONMENT === 'dev' || process.env.AFFINIDI_CLI_ENVIRONMENT === 'test'
|
|
43
|
-
? 'https://boring-galileo-bjhg4t85fi.projects.oryapis.com'
|
|
44
|
-
: 'https://euw1.elements.auth.affinidi.io';
|
|
45
|
-
const clientSDK = new ClientSDK({
|
|
46
|
-
authConfig: { clientId, host },
|
|
47
|
-
// NOTE: log level should NOT be only debug
|
|
48
|
-
logLevel: process.env.AFFINIDI_CLI_DEBUG === 'true' ? 'debug' : 'info',
|
|
49
|
-
component: 'Cli',
|
|
50
|
-
});
|
|
51
|
-
exports.clientSDK = clientSDK;
|
|
52
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/affinidi/index.ts"],"names":[],"mappings":";;;;AAAA,yDAAkC;AAClC,yCAAgE;AAChE,iCAAkD;AAClD,wCAA2C;AAG3C,mFAAmF;AACnF,2DAA2D;AAC3D,EAAE;AACF,sFAAsF;AACtF,MAAa,SAAS;IAapB,YAAY,MAAuB;QACjC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAA;QAC1C,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAA;QAClC,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,IAAI,KAAK,CAAA;QAC9C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,IAAI,+BAAoB,CAAC,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,CAAA;QAClF,IAAI,CAAC,MAAM,GAAG,oBAAY,CAAA;QAE1B,IAAI,CAAC,IAAI,GAAG,IAAI,WAAI,CAAC;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC,CAAA;IACJ,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,MAIZ;QACC,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAChC,CAAC;IAEM,MAAM;QACX,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QACnB,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAA;IAC3B,CAAC;CACF;AA3CD,8BA2CC;AAED,MAAM,QAAQ,GACZ,OAAO,CAAC,GAAG,CAAC,wBAAwB,KAAK,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,wBAAwB,KAAK,MAAM;IAC/F,CAAC,CAAC,sCAAsC;IACxC,CAAC,CAAC,sCAAsC,CAAA;AAC5C,MAAM,IAAI,GACR,OAAO,CAAC,GAAG,CAAC,wBAAwB,KAAK,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,wBAAwB,KAAK,MAAM;IAC/F,CAAC,CAAC,wDAAwD;IAC1D,CAAC,CAAC,wCAAwC,CAAA;AAE9C,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC;IAC9B,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC9B,2CAA2C;IAC3C,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,kBAAkB,KAAK,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;IACtE,SAAS,EAAE,KAAK;CACjB,CAAC,CAAA;AAEO,8BAAS"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export declare const version = 2;
|
|
2
|
-
export declare const validVersions: number[];
|
|
3
|
-
export declare const getMajorVersion: () => number;
|
|
4
|
-
type UserConfig = {};
|
|
5
|
-
type ConfigStoreFormat = {
|
|
6
|
-
version?: number;
|
|
7
|
-
currentUserId: string;
|
|
8
|
-
configs: Record<string, UserConfig>;
|
|
9
|
-
};
|
|
10
|
-
interface IConfigStorer {
|
|
11
|
-
save(params: ConfigStoreFormat): void;
|
|
12
|
-
clear(): void;
|
|
13
|
-
getVersion: () => number | undefined;
|
|
14
|
-
getCurrentUser: () => string;
|
|
15
|
-
getAllUserConfigs: () => Record<string, UserConfig>;
|
|
16
|
-
deleteUserConfig: () => void;
|
|
17
|
-
}
|
|
18
|
-
declare class ConfigService {
|
|
19
|
-
private readonly store;
|
|
20
|
-
constructor(store: IConfigStorer);
|
|
21
|
-
clear: () => void;
|
|
22
|
-
getVersion: () => number | undefined;
|
|
23
|
-
show: () => ConfigStoreFormat;
|
|
24
|
-
private readonly userConfigMustExist;
|
|
25
|
-
private readonly configFileMustExist;
|
|
26
|
-
private readonly configFileExists;
|
|
27
|
-
getCurrentUser: () => string;
|
|
28
|
-
create: (userId: string) => void;
|
|
29
|
-
updateConfigs: (userId: string) => Record<string, UserConfig>;
|
|
30
|
-
createOrUpdate: (userId: string) => void;
|
|
31
|
-
currentUserConfig: () => UserConfig;
|
|
32
|
-
deleteUserConfig: () => void;
|
|
33
|
-
}
|
|
34
|
-
export declare const testStore: Map<any, any>;
|
|
35
|
-
export declare const configService: ConfigService;
|
|
36
|
-
export {};
|