diff --git a/loama/.env b/loama/.env new file mode 100644 index 0000000..313603d --- /dev/null +++ b/loama/.env @@ -0,0 +1 @@ +VITE_DEFAULT_IDP=https://css12.onto-deside.ilabt.imec.be/ \ No newline at end of file diff --git a/loama/.env.example b/loama/.env.example new file mode 100644 index 0000000..9464dc2 --- /dev/null +++ b/loama/.env.example @@ -0,0 +1 @@ +VITE_DEFAULT_IDP=https://example.podprovider.com/ \ No newline at end of file diff --git a/loama/README.md b/loama/README.md index 6d6253f..665bc72 100644 --- a/loama/README.md +++ b/loama/README.md @@ -2,6 +2,10 @@ This is the actual Access Management App, written in Vue. +## IDP Provider + +Authentication works by providing the URL to the pod provider. To ease the experience a default URL is used, this is specified in the `.env` and used in `components/LoginForm.vue`. An example can be found in `.env.example`. + ## How to run Make sure to **first build the controller!** diff --git a/loama/src/App.vue b/loama/src/App.vue index c89720e..eed0da4 100644 --- a/loama/src/App.vue +++ b/loama/src/App.vue @@ -6,12 +6,45 @@ diff --git a/loama/src/components/InfoPopup.vue b/loama/src/components/InfoPopup.vue new file mode 100644 index 0000000..bf5b4e4 --- /dev/null +++ b/loama/src/components/InfoPopup.vue @@ -0,0 +1,51 @@ + + + + + \ No newline at end of file diff --git a/loama/src/components/LoButton.vue b/loama/src/components/LoButton.vue index d678051..46e3d17 100644 --- a/loama/src/components/LoButton.vue +++ b/loama/src/components/LoButton.vue @@ -1,8 +1,10 @@ @@ -48,16 +50,25 @@ button { border-radius: var(--base-corner); height: fit-content; border: none; + cursor: pointer; + border: 0.25rem solid; +} + +button:hover { + background-color: var(--off-black); + border-color: var(--off-black); + color: var(--off-white); } .primary { background-color: var(--solid-purple); + border-color: var(--solid-purple); color: var(--off-white); } .secondary { background-color: var(--solid-white); color: var(--off-black); - border: 0.25rem solid var(--solid-purple); + border-color: var(--solid-purple); } \ No newline at end of file diff --git a/loama/src/components/LoginForm.vue b/loama/src/components/LoginForm.vue new file mode 100644 index 0000000..e1e70d6 --- /dev/null +++ b/loama/src/components/LoginForm.vue @@ -0,0 +1,152 @@ + + + + + diff --git a/loama/src/components/SidePanel.vue b/loama/src/components/SidePanel.vue new file mode 100644 index 0000000..4c5693f --- /dev/null +++ b/loama/src/components/SidePanel.vue @@ -0,0 +1,64 @@ + + + + + + \ No newline at end of file diff --git a/loama/src/router/index.ts b/loama/src/router/index.ts index d3a38ea..3b8c4da 100644 --- a/loama/src/router/index.ts +++ b/loama/src/router/index.ts @@ -1,8 +1,8 @@ import { createRouter, createWebHistory } from 'vue-router' import HomeView from '@/views/HomeView.vue' -import LandingView from '@/views/LandingView.vue' +import LoginView from '@/views/LoginView.vue' import { store } from '@/store' -import { getPod, listPods } from 'loama-controller' +import { listPods } from 'loama-controller' import type { Session } from '@inrupt/solid-client-authn-browser' const router = createRouter({ @@ -10,8 +10,8 @@ const router = createRouter({ routes: [ { path: '/', - name: 'landing', - component: LandingView + name: 'login', + component: LoginView }, { path: '/home', @@ -23,12 +23,12 @@ const router = createRouter({ router.beforeEach(async (to) => { if (!store.session.info.isLoggedIn) { - await store.session.handleIncomingRedirect(); - if(store.session.info.isLoggedIn){ + await store.session.handleIncomingRedirect() + if (store.session.info.isLoggedIn) { store.setUsedPod((await listPods(store.session as Session))[0]) } - if (!store.session.info.isLoggedIn && to.name !== 'landing') { - return { name: 'landing' } + if (!store.session.info.isLoggedIn && to.name !== 'login') { + return { name: 'login' } } } }) diff --git a/loama/src/utils/podlist.json b/loama/src/utils/podlist.json new file mode 100644 index 0000000..730abf0 --- /dev/null +++ b/loama/src/utils/podlist.json @@ -0,0 +1,64 @@ +{ + "podList": [ + { + "name": "Data Pod", + "url": "https://igrant.io/datapod.html", + "owner": "iGrant.io.Sweden", + "location": "EU" + }, + { + "name": "Inrupt Pod Spaces", + "url": "https://start.inrupt.com/profile", + "owner": "Inrupt Inc.", + "location": "EU" + }, + { + "name": "redpencil.io", + "url": "https://solid.redpencil.io/", + "owner": "redpencil.io", + "location": "EU" + }, + { + "name": "solidcommunity.net", + "url": "https://solidcommunity.net/register", + "owner": "Solid Project", + "location": "UK" + }, + { + "name": "solidweb.me", + "url": "https://solidweb.me/.account/login/password/register/", + "owner": "Meisdata", + "location": "EU" + }, + { + "name": "solidweb.org", + "url": "https://solidweb.org/register", + "owner": "Solid Grassoots", + "location": "EU" + }, + { + "name": "teamid.live", + "url": "https://teamid.live/.account/login/password/register/", + "owner": "Meisdata", + "location": "EU" + }, + { + "name": "trinpod.eu", + "url": "https://trinpod.eu/", + "owner": "Graphmetrix", + "location": "EU" + }, + { + "name": "trinpod.us", + "url": "https://trinpod.us/", + "owner": "Graphmetrix", + "location": "USA" + }, + { + "name": "use.id", + "url": "https://get.use.id/people", + "owner": "Digita", + "location": "EU" + } + ] +} diff --git a/loama/src/views/LandingView.vue b/loama/src/views/LandingView.vue deleted file mode 100644 index d68f10c..0000000 --- a/loama/src/views/LandingView.vue +++ /dev/null @@ -1,25 +0,0 @@ - - - \ No newline at end of file diff --git a/loama/src/views/LoginView.vue b/loama/src/views/LoginView.vue new file mode 100644 index 0000000..1aab9e6 --- /dev/null +++ b/loama/src/views/LoginView.vue @@ -0,0 +1,76 @@ + + + + + +