Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
Onegeo LogIn
Manage
Activity
Members
Plan
Wiki
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OneGeo Suite
Sites
Onegeo LogIn
Commits
9d86e0a8
Commit
9d86e0a8
authored
1 year ago
by
Florent Lavelle
Committed by
m431m
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Add VUE_APP_EXTERNAL_LOGOUT_URL + VUE_APP_EXTERNAL_LOGOUT_METHOD
parent
17244b6d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+2
-0
2 additions, 0 deletions
.gitlab-ci.yml
README.md
+2
-0
2 additions, 0 deletions
README.md
src/store/modules/sign-out.store.js
+12
-7
12 additions, 7 deletions
src/store/modules/sign-out.store.js
with
16 additions
and
7 deletions
.gitlab-ci.yml
+
2
−
0
View file @
9d86e0a8
...
@@ -53,6 +53,8 @@ build_development:
...
@@ -53,6 +53,8 @@ build_development:
VUE_APP_USERGROUP_API_PATH=/fr/usergroup/\n
VUE_APP_USERGROUP_API_PATH=/fr/usergroup/\n
VUE_APP_EXTERNAL_LOGIN=true\n
VUE_APP_EXTERNAL_LOGIN=true\n
VUE_APP_EXTERNAL_LOGIN_URL=http://127.0.0.1:80/oidc/authenticate\n
VUE_APP_EXTERNAL_LOGIN_URL=http://127.0.0.1:80/oidc/authenticate\n
VUE_APP_EXTERNAL_LOGOUT_URL=http://127.0.0.1:80/oidc/logout/?redirect_uri=/fr/login/signout\n
VUE_APP_EXTERNAL_LOGOUT_METHOD=get\n
VUE_APP_EXTERNAL_LOGIN_LABEL=Se connecter avec mon compte FooBar\n
VUE_APP_EXTERNAL_LOGIN_LABEL=Se connecter avec mon compte FooBar\n
" > .env
" > .env
-
npm run build
-
npm run build
...
...
This diff is collapsed.
Click to expand it.
README.md
+
2
−
0
View file @
9d86e0a8
...
@@ -46,6 +46,8 @@ VUE_APP_LOGIN_API_PASSWORD=CHANGE_ME
...
@@ -46,6 +46,8 @@ VUE_APP_LOGIN_API_PASSWORD=CHANGE_ME
# External auth
# External auth
VUE_APP_EXTERNAL_LOGIN=true
VUE_APP_EXTERNAL_LOGIN=true
VUE_APP_EXTERNAL_LOGIN_URL=http://127.0.0.1/oidc/authenticate
VUE_APP_EXTERNAL_LOGIN_URL=http://127.0.0.1/oidc/authenticate
VUE_APP_EXTERNAL_LOGOUT_URL=http://127.0.0.1/oidc/logout/?redirect_uri=/fr/login/signout
VUE_APP_EXTERNAL_LOGOUT_METHOD=get
VUE_APP_EXTERNAL_LOGIN_LABEL=Connect with...
VUE_APP_EXTERNAL_LOGIN_LABEL=Connect with...
```
```
...
...
This diff is collapsed.
Click to expand it.
src/store/modules/sign-out.store.js
+
12
−
7
View file @
9d86e0a8
import
client
from
'
@/api/loginAPI.js
'
;
import
client
from
'
@/api/loginAPI.js
'
;
import
i18n
from
'
@/i18n
'
;
import
i18n
from
'
@/i18n
'
;
import
axios
from
'
axios
'
;
const
state
=
{
const
state
=
{
logged
:
null
,
logged
:
null
,
...
@@ -9,11 +10,17 @@ const state = {
...
@@ -9,11 +10,17 @@ const state = {
const
getters
=
{
const
getters
=
{
};
};
export
const
GET_SIGNOUT
=
'
GET_SIGNOUT
'
;
const
actions
=
{
const
actions
=
{
[
GET_SIGNOUT
]:
async
({
commit
})
=>
{
GET_SIGNOUT
:
async
({
commit
})
=>
{
await
client
.
signOut
()
const
EXTERNAL_LOGOUT_URL
=
process
.
env
.
VUE_APP_EXTERNAL_LOGOUT_URL
;
const
EXTERNAL_LOGOUT_METHOD
=
process
.
env
.
VUE_APP_EXTERNAL_LOGOUT_METHOD
;
Promise
.
all
([
client
.
signOut
(),
EXTERNAL_LOGOUT_URL
?
axios
[
EXTERNAL_LOGOUT_METHOD
?
EXTERNAL_LOGOUT_METHOD
:
'
get
'
](
EXTERNAL_LOGOUT_URL
)
:
null
])
.
then
(
.
then
(
()
=>
{
()
=>
{
commit
(
'
SET_ERROR
'
,
undefined
);
commit
(
'
SET_ERROR
'
,
undefined
);
...
@@ -33,18 +40,16 @@ const actions = {
...
@@ -33,18 +40,16 @@ const actions = {
},
},
};
};
export
const
SET_ERROR
=
'
SET_ERROR
'
;
export
const
SET_LOGGED
=
'
SET_LOGGED
'
;
const
mutations
=
{
const
mutations
=
{
[
SET_LOGGED
]
:
(
state
,
value
)
=>
{
SET_LOGGED
:
(
state
,
value
)
=>
{
if
(
value
===
true
)
{
if
(
value
===
true
)
{
state
.
logged
=
true
;
state
.
logged
=
true
;
}
else
{
}
else
{
state
.
logged
=
false
;
state
.
logged
=
false
;
}
}
},
},
[
SET_ERROR
]
:
(
state
,
payload
)
=>
{
SET_ERROR
:
(
state
,
payload
)
=>
{
state
.
error
=
payload
;
state
.
error
=
payload
;
},
},
};
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment