Skip to content

Commit 99b5f9b

Browse files
authored
Merge pull request #1665 from solid/tryMoveAuth
Try move auth
2 parents 2f679c0 + 1f254dd commit 99b5f9b

File tree

5 files changed

+56350
-7641
lines changed

5 files changed

+56350
-7641
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@
1414
/data
1515
/coverage
1616
/node_modules
17-
/npm-debug.log
17+
/npm-debug.log
18+
.history/

bin/config.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"root": "/Users/imyshor/Projects/solid/solidos/workspaces/node-solid-server/bin/data",
3+
"port": "8443",
4+
"serverUri": "https://localhost:8443",
5+
"webid": false,
6+
"mount": "/",
7+
"configPath": "./config",
8+
"configFile": "./config.json",
9+
"dbPath": "./.db",
10+
"sslKey": "../",
11+
"sslCert": "../",
12+
"multiuser": false,
13+
"server": {
14+
"name": "localhost",
15+
"description": "",
16+
"logo": ""
17+
}
18+
}

common/js/index-buttons.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@ function register() {
44
alert(2); window.location.href = "/register";
55
}
66
document.addEventListener('DOMContentLoaded', async function() {
7-
if (!UI.authn.currentUser()) await UI.authn.checkUser();
8-
let user = UI.authn.currentUser();
7+
const authn = UI.authn
8+
const authSession = UI.authn.authSession
9+
10+
if (!authn.currentUser()) await authn.checkUser();
11+
let user = authn.currentUser();
912

1013
// IF LOGGED IN: SET SolidServerRootRedirectLink. LOGOUT
1114
if( user ) {
1215
window.localStorage.setItem(keyname, user.uri);
13-
await UI.authn.authSession.logout();
16+
await authSession.logout();
1417
}
1518
else {
1619
let webId = window.localStorage.getItem(keyname);
@@ -31,7 +34,7 @@ document.addEventListener('DOMContentLoaded', async function() {
3134
let span = document.createElement("span")
3235
span.innerHTML = html
3336
loginArea.appendChild(span);
34-
loginArea.appendChild(UI.authn.loginStatusBox(document, null, {}))
37+
loginArea.appendChild(UI.login.loginStatusBox(document, null, {}))
3538
const logInButton = loginArea.querySelectorAll('input')[1];
3639
logInButton.value = "Log in to see your WebID";
3740
const signUpButton = loginArea.querySelectorAll('input')[2];

0 commit comments

Comments
 (0)