Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Login Aai
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
IML Open Source
Login Aai
Commits
b8d43db5
Commit
b8d43db5
authored
8 months ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
small fixes only
parent
a6f9110a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
functions.js
+12
-4
12 additions, 4 deletions
functions.js
index.php
+16
-4
16 additions, 4 deletions
index.php
with
28 additions
and
8 deletions
functions.js
+
12
−
4
View file @
b8d43db5
...
...
@@ -141,7 +141,7 @@ function showError($sMessage){
}
/**
* Check if user is logged in in
s
hibboleth
* Check if user is logged in in
S
hibboleth
.
* It shows an error, ib shibboleth is not available.
* It detects if a user is logged in.
*/
...
...
@@ -179,8 +179,13 @@ async function checkSession() {
}
}
// ----------------------------------------------------------------------
// INIT
// ----------------------------------------------------------------------
/**
* Init step 1: load language file and make it available in aLang
*/
async
function
init
(){
fetch
(
'
lang/
'
+
sLang
+
'
.json
'
)
.
then
(
response
=>
response
.
json
())
...
...
@@ -192,15 +197,18 @@ async function init(){
}
/**
* Init step 2: Check Shibboleth session
*/
async
function
initStep2
(
langArray
)
{
aLang
=
langArray
;
checkSession
();
}
// ----------------------------------------------------------------------
// INIT
// ----------------------------------------------------------------------
// MAIN
init
();
// ----------------------------------------------------------------------
This diff is collapsed.
Click to expand it.
index.php
+
16
−
4
View file @
b8d43db5
...
...
@@ -16,6 +16,14 @@
require
'inc_functions.php'
;
$aAbout
=
[
'title'
=>
'AAI Login'
,
'author'
=>
'Axel Hahn, Institute for Medical Education, University of Bern'
,
'source'
=>
'https://git-repo.iml.unibe.ch/iml-open-source/login-aai'
,
'license'
=>
'GNU GPL 3.0'
,
'version'
=>
'0.3'
,
];
?><!DOCTYPE html>
<html
lang=
""
dir=
""
>
...
...
@@ -41,17 +49,17 @@
<?php
// --- set language for js script
echo
'<input type="hdden" id="lang" value="'
.
(
$aConfig
[
'lang'
]
??
'en'
)
.
'">'
;
echo
'<input type="h
i
dden" id="lang" value="'
.
(
$aConfig
[
'lang'
]
??
'en'
)
.
'">'
;
// --- messages
echo
$SELFURL
?
''
:
showMessage
(
'error'
,
'SELFURL is not set. $_SERVER[\'SERVER_NAME\'] is not available.'
);
echo
$aConfig
[
'text-info'
]
?
showMessage
(
'info'
,
$aConfig
[
'text-info'
])
:
''
;
// --- id "errorbox" is used for javascript
// --- id "errorbox" is used for javascript
error messages
echo
'<div id="errorbox" class="msg error hidden"></div>'
;
// --- text block if the user is logged in already
echo
'<div id="shib-check-logged-in" class="hidden
_
">
echo
'<div id="shib-check-logged-in" class="hidden">
<h2>'
.
$L
->
t
(
'logged-in-already-title'
)
.
'</h2>
<p>
'
.
$L
->
t
(
'logged-in-already-text'
)
.
'<br>
...
...
@@ -77,7 +85,11 @@
</div>
<script
type=
"text/javascript"
defer
src=
"functions.js"
></script>
<footer><strong>
<?php
echo
$aConfig
[
'title'
]
??
'AAI Login'
;
?>
</strong><br>
AAI Login v0.2 -
<a
href=
"https://git-repo.iml.unibe.ch/iml-open-source/login-aai"
>
Source
</a></a></footer>
<footer>
<strong>
<?php
echo
$aConfig
[
'title'
]
??
'AAI Login'
;
?>
</strong><br>
<?php
echo
$aAbout
[
'title'
]
.
' v'
.
$aAbout
[
'version'
];
?>
-
<a
href=
"
<?php
echo
$aAbout
[
'source'
];
?>
"
>
Source
</a>
</footer>
</body>
</html>
\ No newline at end of file
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