web-eid.js is now fetched from git, fixed a small problem related to authentication

This commit is contained in:
TanelOrumaa 2021-12-12 20:22:27 +02:00
parent 8b78ddf51a
commit 04933f2705
5 changed files with 22 additions and 26 deletions

View File

@ -31,3 +31,6 @@ build/
### VS Code ###
.vscode/
### web-eid.js ###
!**src/demo-website/src/web-eid.js

View File

@ -8,7 +8,7 @@
"name": "demo-website",
"version": "0.1.0",
"dependencies": {
"@web-eid/web-eid-library": "../../../../web-eid.js/",
"@web-eid/web-eid-library": "github:TanelOrumaa/web-eid.js#main",
"core-js": "^3.6.5",
"vue": "^3.0.0",
"vue-cookie-next": "^1.3.0",
@ -32,6 +32,7 @@
"../../../../web-eid.js": {
"name": "@web-eid/web-eid-library",
"version": "1.0.1",
"extraneous": true,
"license": "MIT",
"dependencies": {
"@types/node": "^16.11.11"
@ -1922,10 +1923,9 @@
"dev": true
},
"node_modules/@types/node": {
"version": "16.11.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz",
"integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==",
"dev": true
"version": "16.11.12",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.12.tgz",
"integrity": "sha512-+2Iggwg7PxoO5Kyhvsq9VarmPbIelXP070HMImEpbtGCoyWNINQj4wzjbQCXzdHTRXnqufutJb5KAURZANNBAw=="
},
"node_modules/@types/normalize-package-data": {
"version": "2.4.1",
@ -2643,8 +2643,12 @@
"dev": true
},
"node_modules/@web-eid/web-eid-library": {
"resolved": "../../../../web-eid.js",
"link": true
"version": "1.0.1",
"resolved": "git+ssh://git@github.com/TanelOrumaa/web-eid.js.git#b9c6f50c78a39b444d5df308826cd3f3476233d1",
"license": "MIT",
"dependencies": {
"@types/node": "^16.11.11"
}
},
"node_modules/@webassemblyjs/ast": {
"version": "1.9.0",
@ -16598,10 +16602,9 @@
"dev": true
},
"@types/node": {
"version": "16.11.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz",
"integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==",
"dev": true
"version": "16.11.12",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.12.tgz",
"integrity": "sha512-+2Iggwg7PxoO5Kyhvsq9VarmPbIelXP070HMImEpbtGCoyWNINQj4wzjbQCXzdHTRXnqufutJb5KAURZANNBAw=="
},
"@types/normalize-package-data": {
"version": "2.4.1",
@ -17209,17 +17212,10 @@
"dev": true
},
"@web-eid/web-eid-library": {
"version": "file:../../../../web-eid.js",
"version": "git+ssh://git@github.com/TanelOrumaa/web-eid.js.git#b9c6f50c78a39b444d5df308826cd3f3476233d1",
"from": "@web-eid/web-eid-library@github:TanelOrumaa/web-eid.js#main",
"requires": {
"@types/node": "^16.11.11",
"@typescript-eslint/eslint-plugin": "^4.31.2",
"@typescript-eslint/parser": "^4.31.2",
"eslint": "^7.25.0",
"rimraf": "^3.0.2",
"rollup": "^2.26.11",
"rollup-plugin-polyfill-node": "^0.8.0",
"rollup-plugin-terser": "^5.3.1",
"typescript": "^3.8.3"
"@types/node": "^16.11.11"
}
},
"@webassemblyjs/ast": {

View File

@ -8,7 +8,7 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@web-eid/web-eid-library": "../../../../web-eid.js/",
"@web-eid/web-eid-library": "github:TanelOrumaa/web-eid.js#main",
"core-js": "^3.6.5",
"vue": "^3.0.0",
"vue-cookie-next": "^1.3.0",

View File

@ -8673,9 +8673,6 @@ class WebExtensionService {
if (res.statusCode == 200) {
console.log(res.statusCode);
window.postMessage({ action: this.getRelevantSuccessAction(message) }, location.origin);
res.on("data", (data) => {
console.log("HERE WE GOOO:" + data);
});
}
else {
this.removeFromQueue(message.action);

View File

@ -58,7 +58,7 @@ class SessionManager {
// Fallback to when for some reason session object doesn't have sessionId attached.
sessionId = getSessionId(headers)
}
sessionRegistry[sessionId]!!.roles = arrayListOf()
sessionRegistry[sessionId]?.roles = arrayListOf()
val authentication = UsernamePasswordAuthenticationToken(null, sessionId, listOf())
securityContext.authentication = authentication
}