Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Coscine
frontend
apps
Login
Commits
0a3364b9
Commit
0a3364b9
authored
Dec 16, 2019
by
Marcel Nellesen
Browse files
Merge branch 'Sprint/201922-2' into 'master'
New: Add Shibboleth Integration See merge request coscine/app/login!13
parents
e3ac1ae7
4432d540
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/App.vue
View file @
0a3364b9
...
...
@@ -56,6 +56,7 @@
<component
:is=
"currentInputCard"
:returnUrl=
"this.returnUrl"
:shibbolethReturnUrl=
"this.shibbolethReturnUrl"
@
back=
"loginBack"
@
clickGetLoginForm=
"getLoginForm"
@
clickGetORCiDForm=
"getORCiDForm"
...
...
@@ -140,6 +141,16 @@ function getReturnUrl() {
return
returnUrl
;
}
function
getShibbolethReturnUrl
()
{
const
hookupElement
=
document
.
getElementById
(
'
loginpage
'
);
const
returnUrlParameters
=
hookupElement
!=
null
?
hookupElement
.
getAttribute
(
'
returnUrl
'
)
:
''
;
const
returnUrl
=
encodeURI
(
'
/coscine/api/Coscine.STS/Shibboleth/login?returnUrl=
'
+
returnUrlParameters
,
);
return
returnUrl
;
}
function
getORCiDUrl
()
{
const
hookupElement
=
document
.
getElementById
(
'
loginpage
'
);
const
orcidUrlString
=
...
...
@@ -171,6 +182,7 @@ export default Vue.extend({
rwthImage
:
rootUrl
+
rwthImagePath
,
imageEnabled
,
returnUrl
:
getReturnUrl
(),
shibbolethReturnUrl
:
getShibbolethReturnUrl
(),
orcidUrl
:
getORCiDUrl
(),
currentInputCard
:
'
LoginMain
'
,
};
...
...
src/components/LoginMain.vue
View file @
0a3364b9
...
...
@@ -14,6 +14,12 @@
{{
$t
(
'
login_button_form
'
)
}}
</button>
</div>
<form
class=
"w-100"
:action=
"shibbolethReturnUrl"
method=
"post"
>
<div
class=
"row"
>
<input
class=
"btn btn-primary w-100"
type=
"Submit"
:value=
"$t('login_shibboleth')"
/>
<input
type=
"hidden"
name=
"wa"
value=
"wsignin1.0"
/>
</div>
</form>
<div
class=
"row"
>
<button
class=
"btn btn-secondary w-100"
disabled
>
{{
$t
(
'
login_button_without_account
'
)
}}
</button>
</div>
...
...
@@ -27,6 +33,7 @@ export default Vue.extend({
name
:
'
LoginMain
'
,
props
:
{
returnUrl
:
String
,
shibbolethReturnUrl
:
String
,
},
methods
:
{
clickGetLoginForm
()
{
...
...
src/locale/de.ts
View file @
0a3364b9
...
...
@@ -10,6 +10,7 @@ export default {
login_button_with_account
:
'
Login-Zugang
'
,
login_button_orcid
:
'
Anmelden mit ORCID ID
'
,
login_button_form
:
'
Anmelden mit User ID
'
,
login_shibboleth
:
'
Anmelden mit Shibboleth
'
,
login_button_without_account
:
'
Weiter ohne Login
'
,
signup
:
'
Anmelden
'
,
back
:
'
Zurück
'
,
...
...
src/locale/en.ts
View file @
0a3364b9
...
...
@@ -10,6 +10,7 @@ export default {
login_button_with_account
:
'
Login Access
'
,
login_button_orcid
:
'
Sign in with ORCID ID
'
,
login_button_form
:
'
Sign in with a User ID
'
,
login_shibboleth
:
'
Sign in with Shibboleth
'
,
login_button_without_account
:
'
Continue without Login
'
,
signup
:
'
signup
'
,
back
:
'
Back
'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment