@eid-easy/eideasy-browser-client 2.7.0 → 2.10.1
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/CHANGELOG.md +46 -2
- package/README.md +1 -2
- package/dist/eideasy-browser-client.js +1 -1
- package/package.json +8 -5
- package/.editorconfig +0 -14
- package/.env.development +0 -1
- package/.env.production +0 -1
- package/.env.staging +0 -1
- package/.eslintrc.js +0 -22
- package/.github/ISSUE_TEMPLATE/---bug-report.md +0 -35
- package/.github/ISSUE_TEMPLATE/---feature-request.md +0 -20
- package/.github/workflows/ci.yml +0 -37
- package/.github/workflows/github-release.yml +0 -24
- package/babel.config.js +0 -19
- package/build-utils/loadPresets.js +0 -12
- package/build-utils/presets/webpack.analyze.js +0 -5
- package/build-utils/presets/webpack.compress.js +0 -5
- package/build-utils/webpack.development.js +0 -3
- package/build-utils/webpack.production.js +0 -3
- package/docs/.vuepress/components/AppChallenge.vue +0 -24
- package/docs/.vuepress/components/AppError.vue +0 -55
- package/docs/.vuepress/components/AppIdentification.vue +0 -177
- package/docs/.vuepress/components/AppSigning.vue +0 -171
- package/docs/.vuepress/components/GetClientConfig.vue +0 -56
- package/docs/.vuepress/components/IdentAtHandy.vue +0 -102
- package/docs/.vuepress/components/IdentEParakstsMobile.vue +0 -111
- package/docs/.vuepress/components/IdentFinnishTrustNetwork.vue +0 -102
- package/docs/.vuepress/components/IdentFrejaEid.vue +0 -86
- package/docs/.vuepress/components/IdentIdCard.vue +0 -65
- package/docs/.vuepress/components/IdentMobileId.vue +0 -100
- package/docs/.vuepress/components/IdentMojeId.vue +0 -99
- package/docs/.vuepress/components/IdentSmartId.vue +0 -93
- package/docs/.vuepress/components/IdentZealId.vue +0 -85
- package/docs/.vuepress/components/MethodCard.vue +0 -95
- package/docs/.vuepress/components/SignAtHandy.vue +0 -103
- package/docs/.vuepress/components/SignEParakstsMobile.vue +0 -103
- package/docs/.vuepress/components/SignEvrotrust.vue +0 -113
- package/docs/.vuepress/components/SignFtn.vue +0 -103
- package/docs/.vuepress/components/SignIdCard.vue +0 -70
- package/docs/.vuepress/components/SignMobileId.vue +0 -100
- package/docs/.vuepress/components/SignOtp.vue +0 -93
- package/docs/.vuepress/components/SignSmartId.vue +0 -89
- package/docs/.vuepress/components/SignZealId.vue +0 -106
- package/docs/.vuepress/components/eidEasyDemoClient.js +0 -25
- package/docs/.vuepress/components/logResult.js +0 -17
- package/docs/.vuepress/config.js +0 -34
- package/docs/.vuepress/public/assets/img/eid-easy-icon.png +0 -0
- package/docs/.vuepress/public/assets/img/eid-easy-logo.png +0 -0
- package/docs/.vuepress/styles/core.scss +0 -32
- package/docs/.vuepress/styles/index.scss +0 -124
- package/docs/.vuepress/styles/palette.scss +0 -9
- package/docs/.vuepress/styles/variables.scss +0 -1468
- package/docs/README.md +0 -12
- package/docs/contributing/README.md +0 -47
- package/docs/demos/README.md +0 -21
- package/docs/guide/README.md +0 -248
- package/jest.config.js +0 -16
- package/scripts/release.js +0 -204
- package/scripts/update-translations.js +0 -19
- package/src/MethodException.js +0 -10
- package/src/apiClient/createApiClient.js +0 -52
- package/src/apiClient/createApiClient.test.js +0 -20
- package/src/apiClient/createApiEndpoints.js +0 -71
- package/src/cloneDeep.js +0 -3
- package/src/config.js +0 -260
- package/src/coreSettingsSchema.js +0 -76
- package/src/createApiPoller.js +0 -54
- package/src/createClientCore.js +0 -84
- package/src/createGetClientConfig.js +0 -14
- package/src/createModuleCreator.js +0 -66
- package/src/createMonitoringService.js +0 -33
- package/src/createRequestError.js +0 -24
- package/src/createSettings.js +0 -26
- package/src/createStep.js +0 -49
- package/src/formatError.js +0 -19
- package/src/i18n/createI18n.js +0 -52
- package/src/i18n/createI18n.test.js +0 -63
- package/src/i18n/de.json +0 -1
- package/src/i18n/en.json +0 -1
- package/src/i18n/et.json +0 -1
- package/src/i18n/lt.json +0 -1
- package/src/i18n/lv.json +0 -1
- package/src/i18n/ru.json +0 -1
- package/src/identificationModules/createAtHandy.js +0 -37
- package/src/identificationModules/createEParakstsMobile.js +0 -37
- package/src/identificationModules/createFinnishTrustNetwork.js +0 -40
- package/src/identificationModules/createFrejaEid.js +0 -118
- package/src/identificationModules/createIdCard.js +0 -70
- package/src/identificationModules/createMobileId.js +0 -117
- package/src/identificationModules/createMojeId.js +0 -37
- package/src/identificationModules/createSmartId.js +0 -110
- package/src/identificationModules/createZealId.js +0 -107
- package/src/identificationModules/identificationModules.js +0 -21
- package/src/identificationModules/identificationModules.test.js +0 -21
- package/src/index.js +0 -9
- package/src/main.js +0 -78
- package/src/modes.js +0 -6
- package/src/poll.js +0 -36
- package/src/request.js +0 -45
- package/src/signatureModules/createAtHandySignature.js +0 -70
- package/src/signatureModules/createEParakstsMobileSignature.js +0 -70
- package/src/signatureModules/createEvrotrustSignature.js +0 -144
- package/src/signatureModules/createFtnSignature.js +0 -70
- package/src/signatureModules/createIdCardSignature.js +0 -217
- package/src/signatureModules/createMobileIdSignature.js +0 -129
- package/src/signatureModules/createOtpSignature.js +0 -68
- package/src/signatureModules/createSmartIdSignature.js +0 -124
- package/src/signatureModules/createZealIdSignature.js +0 -37
- package/src/signatureModules/signatureModules.js +0 -21
- package/src/tests/cloneDeep.test.js +0 -31
- package/src/tests/config.test.js +0 -25
- package/src/tests/createRequestError.test.js +0 -36
- package/src/tests/main.test.js +0 -7
- package/src/tests/poll.test.js +0 -64
- package/src/tests/windowOpen.test.js +0 -43
- package/src/windowOpen.js +0 -46
- package/webpack.config.js +0 -55
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import eidEasyDemoClient from './eidEasyDemoClient';
|
|
3
|
-
import AppError from './AppError';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
name: 'GetClientConfig',
|
|
7
|
-
components: {
|
|
8
|
-
AppError,
|
|
9
|
-
},
|
|
10
|
-
data() {
|
|
11
|
-
return {
|
|
12
|
-
isLoading: false,
|
|
13
|
-
error: null,
|
|
14
|
-
clientConfig: null,
|
|
15
|
-
eidEasyDemoClient,
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
methods: {
|
|
19
|
-
async handleButtonClick() {
|
|
20
|
-
this.isLoading = true;
|
|
21
|
-
this.error = '';
|
|
22
|
-
let result;
|
|
23
|
-
try {
|
|
24
|
-
result = await eidEasyDemoClient.getClientConfig();
|
|
25
|
-
console.log(result);
|
|
26
|
-
} catch (error) {
|
|
27
|
-
console.error(error);
|
|
28
|
-
this.error = error;
|
|
29
|
-
}
|
|
30
|
-
this.isLoading = false;
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
}
|
|
34
|
-
</script>
|
|
35
|
-
|
|
36
|
-
<template>
|
|
37
|
-
<div class="appRoot">
|
|
38
|
-
<div class="row">
|
|
39
|
-
<div class="col-md-6">
|
|
40
|
-
<AppError v-if="error" :error="error" />
|
|
41
|
-
<div v-if="isLoading" class="spinner-border text-primary mb-2 mt-2" role="status">
|
|
42
|
-
<span class="sr-only">Loading...</span>
|
|
43
|
-
</div>
|
|
44
|
-
<button v-else @click.prevent="handleButtonClick" class="btn btn-primary">Get client config</button>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</template>
|
|
49
|
-
|
|
50
|
-
<style lang="scss">
|
|
51
|
-
.appRoot {
|
|
52
|
-
@import "../styles/core";
|
|
53
|
-
|
|
54
|
-
margin-top: 30px;
|
|
55
|
-
}
|
|
56
|
-
</style>
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import MethodCard from './MethodCard';
|
|
3
|
-
import logResult from './logResult';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
name: 'IdentAtHandy',
|
|
7
|
-
components: {
|
|
8
|
-
MethodCard,
|
|
9
|
-
},
|
|
10
|
-
data() {
|
|
11
|
-
return {
|
|
12
|
-
isLoading: false,
|
|
13
|
-
challenge: null,
|
|
14
|
-
identificationProcess: null,
|
|
15
|
-
customInsteadOfRedirect: 'none',
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
props: {
|
|
19
|
-
eidEasyClient: {
|
|
20
|
-
default: null,
|
|
21
|
-
required: true,
|
|
22
|
-
},
|
|
23
|
-
countryCode: {
|
|
24
|
-
default: null,
|
|
25
|
-
required: true,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
methods: {
|
|
29
|
-
getFieldId(id) {
|
|
30
|
-
return this.$options.name + '-' + id;
|
|
31
|
-
},
|
|
32
|
-
handleStartClick({
|
|
33
|
-
addErrors,
|
|
34
|
-
addSuccess,
|
|
35
|
-
startLoading,
|
|
36
|
-
endLoading,
|
|
37
|
-
}) {
|
|
38
|
-
startLoading();
|
|
39
|
-
const config = {
|
|
40
|
-
fail: (result) => {
|
|
41
|
-
logResult(result, 'fail');
|
|
42
|
-
addErrors(result);
|
|
43
|
-
},
|
|
44
|
-
success: (result) => {
|
|
45
|
-
logResult(result, 'success');
|
|
46
|
-
addSuccess(result);
|
|
47
|
-
},
|
|
48
|
-
finished: (result) => {
|
|
49
|
-
logResult(result, 'finished');
|
|
50
|
-
endLoading();
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
if (this.customInsteadOfRedirect === 'error') {
|
|
55
|
-
config.redirect = () => ({
|
|
56
|
-
data: 'Some data',
|
|
57
|
-
error: new Error('A mock error'),
|
|
58
|
-
});
|
|
59
|
-
} else if (this.customInsteadOfRedirect === 'data') {
|
|
60
|
-
config.redirect = () => new Promise((resolve) => {
|
|
61
|
-
setTimeout(() => {
|
|
62
|
-
resolve({
|
|
63
|
-
data: 'Some data',
|
|
64
|
-
});
|
|
65
|
-
}, 1000);
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
this.identificationProcess = this.eidEasyClient.identification.atHandy.start(config);
|
|
69
|
-
},
|
|
70
|
-
handleCancelClick() {
|
|
71
|
-
this.identificationProcess && this.identificationProcess.cancel();
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
}
|
|
75
|
-
</script>
|
|
76
|
-
|
|
77
|
-
<template>
|
|
78
|
-
<MethodCard
|
|
79
|
-
title="Austrian Handy Signatur identification"
|
|
80
|
-
:on-start-click="handleStartClick"
|
|
81
|
-
:on-cancel-click="handleCancelClick"
|
|
82
|
-
>
|
|
83
|
-
<div class="form-check">
|
|
84
|
-
<input v-model="customInsteadOfRedirect" class="form-check-input" value="none" type="radio" :id="getFieldId('redirectOption1')">
|
|
85
|
-
<label class="form-check-label" :for="getFieldId('redirectOption1')">
|
|
86
|
-
No custom redirect
|
|
87
|
-
</label>
|
|
88
|
-
</div>
|
|
89
|
-
<div class="form-check">
|
|
90
|
-
<input v-model="customInsteadOfRedirect" class="form-check-input" type="radio" value="error" :id="getFieldId('redirectOption2')">
|
|
91
|
-
<label class="form-check-label" :for="getFieldId('redirectOption2')">
|
|
92
|
-
Custom redirect function that has an error in the result object
|
|
93
|
-
</label>
|
|
94
|
-
</div>
|
|
95
|
-
<div class="form-check">
|
|
96
|
-
<input v-model="customInsteadOfRedirect" class="form-check-input" type="radio" value="data" :id="getFieldId('redirectOption3')">
|
|
97
|
-
<label class="form-check-label" :for="getFieldId('redirectOption3')">
|
|
98
|
-
Custom redirect function that has data in the result object
|
|
99
|
-
</label>
|
|
100
|
-
</div>
|
|
101
|
-
</MethodCard>
|
|
102
|
-
</template>
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import MethodCard from './MethodCard';
|
|
3
|
-
import logResult from './logResult';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
name: 'IdentEParakstsMobile',
|
|
7
|
-
components: {
|
|
8
|
-
MethodCard,
|
|
9
|
-
},
|
|
10
|
-
data() {
|
|
11
|
-
return {
|
|
12
|
-
isLoading: false,
|
|
13
|
-
challenge: null,
|
|
14
|
-
identificationProcess: null,
|
|
15
|
-
customInsteadOfRedirect: 'none',
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
props: {
|
|
19
|
-
eidEasyClient: {
|
|
20
|
-
default: null,
|
|
21
|
-
required: true,
|
|
22
|
-
},
|
|
23
|
-
countryCode: {
|
|
24
|
-
default: null,
|
|
25
|
-
required: true,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
methods: {
|
|
29
|
-
getFieldId(id) {
|
|
30
|
-
return this.$options.name + '-' + id;
|
|
31
|
-
},
|
|
32
|
-
handleStartClick({
|
|
33
|
-
addErrors,
|
|
34
|
-
addSuccess,
|
|
35
|
-
startLoading,
|
|
36
|
-
endLoading,
|
|
37
|
-
}) {
|
|
38
|
-
startLoading();
|
|
39
|
-
const config = {
|
|
40
|
-
fail: (result) => {
|
|
41
|
-
logResult(result, 'fail');
|
|
42
|
-
addErrors(result);
|
|
43
|
-
},
|
|
44
|
-
success: (result) => {
|
|
45
|
-
logResult(result, 'success');
|
|
46
|
-
addSuccess(result);
|
|
47
|
-
},
|
|
48
|
-
finished: (result) => {
|
|
49
|
-
logResult(result, 'finished');
|
|
50
|
-
endLoading();
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
if (this.customInsteadOfRedirect === 'error') {
|
|
55
|
-
config.redirect = () => ({
|
|
56
|
-
data: 'Some data',
|
|
57
|
-
error: new Error('A mock error'),
|
|
58
|
-
});
|
|
59
|
-
} else if (this.customInsteadOfRedirect === 'data') {
|
|
60
|
-
config.redirect = () => new Promise((resolve) => {
|
|
61
|
-
setTimeout(() => {
|
|
62
|
-
resolve({
|
|
63
|
-
data: 'Some data',
|
|
64
|
-
});
|
|
65
|
-
}, 2000);
|
|
66
|
-
});
|
|
67
|
-
} else if (this.customInsteadOfRedirect === 'abort') {
|
|
68
|
-
config.redirect = (context) => {
|
|
69
|
-
console.log(context);
|
|
70
|
-
// you can do the redirect here yourself should you wish so
|
|
71
|
-
// window.location.href = context.redirectUrl;
|
|
72
|
-
return {
|
|
73
|
-
data: 'cancel',
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
this.identificationProcess = this.eidEasyClient.identification.eParakstsMobile.start(config);
|
|
78
|
-
},
|
|
79
|
-
handleCancelClick() {
|
|
80
|
-
this.identificationProcess && this.identificationProcess.cancel();
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
}
|
|
84
|
-
</script>
|
|
85
|
-
|
|
86
|
-
<template>
|
|
87
|
-
<MethodCard
|
|
88
|
-
title="eParaksts mobile"
|
|
89
|
-
:on-start-click="handleStartClick"
|
|
90
|
-
:on-cancel-click="handleCancelClick"
|
|
91
|
-
>
|
|
92
|
-
<div class="form-check">
|
|
93
|
-
<input v-model="customInsteadOfRedirect" class="form-check-input" value="none" type="radio" :id="getFieldId('redirectOption1')">
|
|
94
|
-
<label class="form-check-label" :for="getFieldId('redirectOption1')">
|
|
95
|
-
No custom redirect
|
|
96
|
-
</label>
|
|
97
|
-
</div>
|
|
98
|
-
<div class="form-check">
|
|
99
|
-
<input v-model="customInsteadOfRedirect" class="form-check-input" type="radio" value="error" :id="getFieldId('redirectOption2')">
|
|
100
|
-
<label class="form-check-label" :for="getFieldId('redirectOption2')">
|
|
101
|
-
Custom redirect function that has an error in the result object
|
|
102
|
-
</label>
|
|
103
|
-
</div>
|
|
104
|
-
<div class="form-check">
|
|
105
|
-
<input v-model="customInsteadOfRedirect" class="form-check-input" type="radio" value="data" :id="getFieldId('redirectOption3')">
|
|
106
|
-
<label class="form-check-label" :for="getFieldId('redirectOption3')">
|
|
107
|
-
Custom redirect function that has data in the result object
|
|
108
|
-
</label>
|
|
109
|
-
</div>
|
|
110
|
-
</MethodCard>
|
|
111
|
-
</template>
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import MethodCard from './MethodCard';
|
|
3
|
-
import logResult from './logResult';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
name: 'IdentFinnishTrustNetwork',
|
|
7
|
-
components: {
|
|
8
|
-
MethodCard,
|
|
9
|
-
},
|
|
10
|
-
data() {
|
|
11
|
-
return {
|
|
12
|
-
isLoading: false,
|
|
13
|
-
challenge: null,
|
|
14
|
-
identificationProcess: null,
|
|
15
|
-
customInsteadOfRedirect: 'none',
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
props: {
|
|
19
|
-
eidEasyClient: {
|
|
20
|
-
default: null,
|
|
21
|
-
required: true,
|
|
22
|
-
},
|
|
23
|
-
countryCode: {
|
|
24
|
-
default: null,
|
|
25
|
-
required: true,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
methods: {
|
|
29
|
-
getFieldId(id) {
|
|
30
|
-
return this.$options.name + '-' + id;
|
|
31
|
-
},
|
|
32
|
-
handleStartClick({
|
|
33
|
-
addErrors,
|
|
34
|
-
addSuccess,
|
|
35
|
-
startLoading,
|
|
36
|
-
endLoading,
|
|
37
|
-
}) {
|
|
38
|
-
startLoading();
|
|
39
|
-
const config = {
|
|
40
|
-
fail: (result) => {
|
|
41
|
-
logResult(result, 'fail');
|
|
42
|
-
addErrors(result);
|
|
43
|
-
},
|
|
44
|
-
success: (result) => {
|
|
45
|
-
logResult(result, 'success');
|
|
46
|
-
addSuccess(result);
|
|
47
|
-
},
|
|
48
|
-
finished: (result) => {
|
|
49
|
-
logResult(result, 'finished');
|
|
50
|
-
endLoading();
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
if (this.customInsteadOfRedirect === 'error') {
|
|
55
|
-
config.redirect = () => ({
|
|
56
|
-
data: 'Some data',
|
|
57
|
-
error: new Error('A mock error'),
|
|
58
|
-
});
|
|
59
|
-
} else if (this.customInsteadOfRedirect === 'data') {
|
|
60
|
-
config.redirect = () => new Promise((resolve) => {
|
|
61
|
-
setTimeout(() => {
|
|
62
|
-
resolve({
|
|
63
|
-
data: 'Some data',
|
|
64
|
-
});
|
|
65
|
-
}, 1000);
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
this.identificationProcess = this.eidEasyClient.identification.finnishTrustNetwork.start(config);
|
|
69
|
-
},
|
|
70
|
-
handleCancelClick() {
|
|
71
|
-
this.identificationProcess && this.identificationProcess.cancel();
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
}
|
|
75
|
-
</script>
|
|
76
|
-
|
|
77
|
-
<template>
|
|
78
|
-
<MethodCard
|
|
79
|
-
title="Finnish Trust Network"
|
|
80
|
-
:on-start-click="handleStartClick"
|
|
81
|
-
:on-cancel-click="handleCancelClick"
|
|
82
|
-
>
|
|
83
|
-
<div class="form-check">
|
|
84
|
-
<input v-model="customInsteadOfRedirect" class="form-check-input" value="none" type="radio" :id="getFieldId('redirectOption1')">
|
|
85
|
-
<label class="form-check-label" :for="getFieldId('redirectOption1')">
|
|
86
|
-
No custom redirect
|
|
87
|
-
</label>
|
|
88
|
-
</div>
|
|
89
|
-
<div class="form-check">
|
|
90
|
-
<input v-model="customInsteadOfRedirect" class="form-check-input" type="radio" value="error" :id="getFieldId('redirectOption2')">
|
|
91
|
-
<label class="form-check-label" :for="getFieldId('redirectOption2')">
|
|
92
|
-
Custom redirect function that has an error in the result object
|
|
93
|
-
</label>
|
|
94
|
-
</div>
|
|
95
|
-
<div class="form-check">
|
|
96
|
-
<input v-model="customInsteadOfRedirect" class="form-check-input" type="radio" value="data" :id="getFieldId('redirectOption3')">
|
|
97
|
-
<label class="form-check-label" :for="getFieldId('redirectOption3')">
|
|
98
|
-
Custom redirect function that has data in the result object
|
|
99
|
-
</label>
|
|
100
|
-
</div>
|
|
101
|
-
</MethodCard>
|
|
102
|
-
</template>
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import MethodCard from './MethodCard';
|
|
3
|
-
import logResult from './logResult';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
name: 'IdentFrejaEid',
|
|
7
|
-
components: {
|
|
8
|
-
MethodCard,
|
|
9
|
-
},
|
|
10
|
-
data() {
|
|
11
|
-
return {
|
|
12
|
-
idcode: '',
|
|
13
|
-
isLoading: false,
|
|
14
|
-
errors: null,
|
|
15
|
-
userInstructions: null,
|
|
16
|
-
identificationProcess: null,
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
props: {
|
|
20
|
-
eidEasyClient: {
|
|
21
|
-
default: null,
|
|
22
|
-
required: true,
|
|
23
|
-
},
|
|
24
|
-
countryCode: {
|
|
25
|
-
default: null,
|
|
26
|
-
required: true,
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
methods: {
|
|
30
|
-
handleStartClick({
|
|
31
|
-
addErrors,
|
|
32
|
-
addSuccess,
|
|
33
|
-
startLoading,
|
|
34
|
-
endLoading,
|
|
35
|
-
}) {
|
|
36
|
-
startLoading();
|
|
37
|
-
this.identificationProcess = this.eidEasyClient.identification.frejaEid.start({
|
|
38
|
-
countryCode: this.countryCode,
|
|
39
|
-
idcode: this.idcode,
|
|
40
|
-
started: (result) => {
|
|
41
|
-
logResult(result, 'started');
|
|
42
|
-
this.userInstructions = 'Approve the identification request on your FREJA eID app';
|
|
43
|
-
},
|
|
44
|
-
fail: (result) => {
|
|
45
|
-
logResult(result, 'fail');
|
|
46
|
-
addErrors(result);
|
|
47
|
-
},
|
|
48
|
-
success: (result) => {
|
|
49
|
-
logResult(result, 'success');
|
|
50
|
-
addSuccess(result);
|
|
51
|
-
},
|
|
52
|
-
finished: (result) => {
|
|
53
|
-
logResult(result, 'finished');
|
|
54
|
-
this.challenge = null;
|
|
55
|
-
endLoading();
|
|
56
|
-
},
|
|
57
|
-
});
|
|
58
|
-
},
|
|
59
|
-
handleCancelClick() {
|
|
60
|
-
this.identificationProcess && this.identificationProcess.cancel();
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
}
|
|
64
|
-
</script>
|
|
65
|
-
|
|
66
|
-
<template>
|
|
67
|
-
<MethodCard
|
|
68
|
-
title="FREJA eID"
|
|
69
|
-
:on-start-click="handleStartClick"
|
|
70
|
-
:on-cancel-click="handleCancelClick"
|
|
71
|
-
>
|
|
72
|
-
<div v-if="userInstructions" class="mb-3">
|
|
73
|
-
{{ userInstructions }}
|
|
74
|
-
</div>
|
|
75
|
-
<div class="mb-3">
|
|
76
|
-
<label class="form-label" for="idCodeInputFreja">Personal Identity Code</label>
|
|
77
|
-
<input
|
|
78
|
-
v-model="idcode"
|
|
79
|
-
type="text"
|
|
80
|
-
class="form-control"
|
|
81
|
-
id="idCodeInputFreja"
|
|
82
|
-
placeholder="YYYYMMDDXXXX"
|
|
83
|
-
>
|
|
84
|
-
</div>
|
|
85
|
-
</MethodCard>
|
|
86
|
-
</template>
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import MethodCard from './MethodCard';
|
|
3
|
-
import logResult from './logResult';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
name: 'IdentIdCard',
|
|
7
|
-
components: {
|
|
8
|
-
MethodCard,
|
|
9
|
-
},
|
|
10
|
-
data() {
|
|
11
|
-
return {
|
|
12
|
-
isLoading: false,
|
|
13
|
-
challenge: null,
|
|
14
|
-
identificationProcess: null,
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
props: {
|
|
18
|
-
eidEasyClient: {
|
|
19
|
-
default: null,
|
|
20
|
-
required: true,
|
|
21
|
-
},
|
|
22
|
-
countryCode: {
|
|
23
|
-
default: null,
|
|
24
|
-
required: true,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
methods: {
|
|
28
|
-
handleStartClick({
|
|
29
|
-
addErrors,
|
|
30
|
-
addSuccess,
|
|
31
|
-
startLoading,
|
|
32
|
-
endLoading,
|
|
33
|
-
}) {
|
|
34
|
-
startLoading();
|
|
35
|
-
this.identificationProcess = this.eidEasyClient.identification.idCard.start({
|
|
36
|
-
countryCode: this.countryCode,
|
|
37
|
-
fail: (result) => {
|
|
38
|
-
logResult(result, 'fail');
|
|
39
|
-
addErrors(result);
|
|
40
|
-
},
|
|
41
|
-
success: (result) => {
|
|
42
|
-
logResult(result, 'success');
|
|
43
|
-
addSuccess(result);
|
|
44
|
-
},
|
|
45
|
-
finished: (result) => {
|
|
46
|
-
logResult(result, 'finished');
|
|
47
|
-
endLoading();
|
|
48
|
-
},
|
|
49
|
-
});
|
|
50
|
-
},
|
|
51
|
-
handleCancelClick() {
|
|
52
|
-
this.identificationProcess && this.identificationProcess.cancel();
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
}
|
|
56
|
-
</script>
|
|
57
|
-
|
|
58
|
-
<template>
|
|
59
|
-
<MethodCard
|
|
60
|
-
title="ID Card"
|
|
61
|
-
:on-start-click="handleStartClick"
|
|
62
|
-
:on-cancel-click="handleCancelClick"
|
|
63
|
-
>
|
|
64
|
-
</MethodCard>
|
|
65
|
-
</template>
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import MethodCard from './MethodCard';
|
|
3
|
-
import AppChallenge from './AppChallenge';
|
|
4
|
-
import logResult from './logResult';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
name: 'IdentMobileId',
|
|
8
|
-
components: {
|
|
9
|
-
MethodCard,
|
|
10
|
-
AppChallenge,
|
|
11
|
-
},
|
|
12
|
-
data() {
|
|
13
|
-
return {
|
|
14
|
-
idcode: '',
|
|
15
|
-
phone: '',
|
|
16
|
-
isLoading: false,
|
|
17
|
-
errors: null,
|
|
18
|
-
challenge: null,
|
|
19
|
-
identificationProcess: null,
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
props: {
|
|
23
|
-
eidEasyClient: {
|
|
24
|
-
default: null,
|
|
25
|
-
required: true,
|
|
26
|
-
},
|
|
27
|
-
countryCode: {
|
|
28
|
-
default: null,
|
|
29
|
-
required: true,
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
methods: {
|
|
33
|
-
handleStartClick({
|
|
34
|
-
addErrors,
|
|
35
|
-
addSuccess,
|
|
36
|
-
startLoading,
|
|
37
|
-
endLoading,
|
|
38
|
-
}) {
|
|
39
|
-
startLoading();
|
|
40
|
-
this.identificationProcess = this.eidEasyClient.identification.mobileId.start({
|
|
41
|
-
countryCode: this.countryCode,
|
|
42
|
-
idcode: this.idcode,
|
|
43
|
-
phone: this.phone,
|
|
44
|
-
started: (result) => {
|
|
45
|
-
logResult(result, 'started');
|
|
46
|
-
this.challenge = result.data.challenge;
|
|
47
|
-
},
|
|
48
|
-
fail: (result) => {
|
|
49
|
-
logResult(result, 'fail');
|
|
50
|
-
addErrors(result);
|
|
51
|
-
},
|
|
52
|
-
success: (result) => {
|
|
53
|
-
logResult(result, 'success');
|
|
54
|
-
addSuccess(result);
|
|
55
|
-
},
|
|
56
|
-
finished: (result) => {
|
|
57
|
-
logResult(result, 'finished');
|
|
58
|
-
this.challenge = null;
|
|
59
|
-
endLoading();
|
|
60
|
-
},
|
|
61
|
-
});
|
|
62
|
-
},
|
|
63
|
-
handleCancelClick() {
|
|
64
|
-
this.identificationProcess && this.identificationProcess.cancel();
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
}
|
|
68
|
-
</script>
|
|
69
|
-
|
|
70
|
-
<template>
|
|
71
|
-
<MethodCard
|
|
72
|
-
title="Mobile ID"
|
|
73
|
-
:on-start-click="handleStartClick"
|
|
74
|
-
:on-cancel-click="handleCancelClick"
|
|
75
|
-
>
|
|
76
|
-
<AppChallenge
|
|
77
|
-
v-if="challenge"
|
|
78
|
-
class="mb-3"
|
|
79
|
-
:code="challenge"
|
|
80
|
-
/>
|
|
81
|
-
<div class="mb-3">
|
|
82
|
-
<label for="idCodeInputMobile" class="form-label">Personal Identity Code</label>
|
|
83
|
-
<input
|
|
84
|
-
v-model="idcode"
|
|
85
|
-
type="text"
|
|
86
|
-
class="form-control"
|
|
87
|
-
id="idCodeInputMobile"
|
|
88
|
-
>
|
|
89
|
-
</div>
|
|
90
|
-
<div class="mb-3">
|
|
91
|
-
<label for="phoneInputMobile" class="form-label">Phone Number</label>
|
|
92
|
-
<input
|
|
93
|
-
v-model="phone"
|
|
94
|
-
type="text"
|
|
95
|
-
class="form-control"
|
|
96
|
-
id="phoneInputMobile"
|
|
97
|
-
>
|
|
98
|
-
</div>
|
|
99
|
-
</MethodCard>
|
|
100
|
-
</template>
|