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
8ef7f0be
Commit
8ef7f0be
authored
2 years ago
by
Florent Lavelle
Committed by
m431m
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add external auth btn (optional)
parent
7a057349
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#12955
passed with warnings
1 year ago
Stage: sonarqube
Stage: build
Stage: deploy
Changes
4
Pipelines
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+6
-2
6 additions, 2 deletions
.gitlab-ci.yml
README.md
+5
-0
5 additions, 0 deletions
README.md
public/config.js
+1
-1
1 addition, 1 deletion
public/config.js
src/views/SignIn.vue
+30
-0
30 additions, 0 deletions
src/views/SignIn.vue
with
42 additions
and
3 deletions
.gitlab-ci.yml
+
6
−
2
View file @
8ef7f0be
...
...
@@ -36,7 +36,7 @@ build_development:
-
echo -e "
NODE_ENV=development\n
DOMAIN=https://dev.pigma.neogeo.fr/fr\n
VUE_APP_DOMAIN=
https://dev.pigma.neogeo.fr/
\n
VUE_APP_DOMAIN=
${DOMAIN}
\n
BASE_PATH=/\n
VUE_APP_BASE_PATH=${BASE_PATH}\n
VUE_APP_NEXT_DEFAULT=/\n
...
...
@@ -50,7 +50,11 @@ build_development:
VUE_APP_FAVICON_URL=${VUE_APP_DOMAIN}/assets/favicon.png\n
VUE_APP_LOGIN_API_PATH=/fr/login/\n
VUE_APP_ORGANISATION_API_PATH=/fr/organisation/\n
VUE_APP_USERGROUP_API_PATH=/fr/usergroup/\n" > .env
VUE_APP_USERGROUP_API_PATH=/fr/usergroup/\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_LABEL=Se connecter avec mon compte FooBar\n
" > .env
-
npm run build
artifacts
:
paths
:
...
...
This diff is collapsed.
Click to expand it.
README.md
+
5
−
0
View file @
8ef7f0be
...
...
@@ -42,6 +42,11 @@ VUE_APP_USERGROUP_API_PATH=/fr/usergroup/
# AUTH
VUE_APP_LOGIN_API_USERNAME=admin
VUE_APP_LOGIN_API_PASSWORD=CHANGE_ME
# External auth
VUE_APP_EXTERNAL_LOGIN=true
VUE_APP_EXTERNAL_LOGIN_URL=http://127.0.0.1/oidc/authenticate
VUE_APP_EXTERNAL_LOGIN_LABEL=Connect with...
```
### Compiles and hot-reloads for development
...
...
This diff is collapsed.
Click to expand it.
public/config.js
+
1
−
1
View file @
8ef7f0be
...
...
@@ -6,7 +6,7 @@ export default {
/^
\/
portail/
,
],
client
:
{
name
:
"
Dem
o
"
,
name
:
"
Neoge
o
"
,
email
:
"
contact@neogeo.fr
"
},
forms
:
{
...
...
This diff is collapsed.
Click to expand it.
src/views/SignIn.vue
+
30
−
0
View file @
8ef7f0be
...
...
@@ -4,6 +4,23 @@
<div
class=
"sign-in-header"
>
<img
alt=
"logo"
:src=
"logoPath"
/>
</div>
<div
v-if=
"externalAuth.enabled"
class=
"sign-in-form"
>
<h5
class=
"title"
>
{{
externalAuth
.
label
}}
</h5>
<form>
<div
class=
"form-row"
>
<b-button
variant=
"primary"
block
@
click.prevent=
"submitExternalAuth"
>
{{
$t
(
'
words.login
'
)
}}
</b-button>
</div>
</form>
</div>
<div
class=
"sign-in-form"
>
<h5
v-if=
"$config.forms.signin.title"
...
...
@@ -119,6 +136,10 @@ import {
mapMutations
,
}
from
'
vuex
'
;
// const EXTERNAL_LOGIN = process.env.VUE_APP_EXTERNAL_LOGIN;
// const EXTERNAL_LOGIN_URL = process.env.VUE_APP_EXTERNAL_LOGIN_URL;
// const EXTERNAL_LOGIN_LABEL = process.env.VUE_APP_EXTERNAL_LOGIN_LABEL
const
signInActions
=
[
'
POST_SIGNIN
'
];
...
...
@@ -134,6 +155,12 @@ export default {
data
()
{
return
{
externalAuth
:
{
enabled
:
process
.
env
.
VUE_APP_EXTERNAL_LOGIN
,
url
:
process
.
env
.
VUE_APP_EXTERNAL_LOGIN_URL
,
label
:
process
.
env
.
VUE_APP_EXTERNAL_LOGIN_LABEL
}
,
showPassword
:
false
,
btnPressed
:
false
,
form
:
{
...
...
@@ -192,6 +219,9 @@ export default {
this
.
btnPressed
=
true
;
await
this
.
POST_SIGNIN
();
}
,
submitExternalAuth
()
{
window
.
location
.
href
=
this
.
externalAuth
.
url
;
}
}
,
}
;
<
/script
>
...
...
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