Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Jannik Hellenkamp
website
Commits
a2f16da8
Commit
a2f16da8
authored
8 years ago
by
Andreas Valder
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of git.fsmpi.rwth-aachen.de:videoagwebsite/videoagwebsite
parents
38979178
a054f444
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
l2pauth.py
+6
-0
6 additions, 0 deletions
l2pauth.py
server.py
+1
-2
1 addition, 2 deletions
server.py
with
7 additions
and
2 deletions
l2pauth.py
+
6
−
0
View file @
a2f16da8
...
@@ -16,6 +16,8 @@ def oauthget(endpoint, **args):
...
@@ -16,6 +16,8 @@ def oauthget(endpoint, **args):
@app.route
(
'
/l2pauth
'
)
@app.route
(
'
/l2pauth
'
)
def
start_l2pauth
():
def
start_l2pauth
():
if
'
L2P_APIKEY
'
not
in
config
:
return
render_template
(
"
500.html
"
),
500
code
=
oauthget
(
'
code
'
,
scope
=
'
l2p2013.rwth
'
)
code
=
oauthget
(
'
code
'
,
scope
=
'
l2p2013.rwth
'
)
session
[
'
oauthcode
'
]
=
code
[
'
device_code
'
]
session
[
'
oauthcode
'
]
=
code
[
'
device_code
'
]
session
[
'
oauthscope
'
]
=
'
l2p
'
session
[
'
oauthscope
'
]
=
'
l2p
'
...
@@ -23,6 +25,8 @@ def start_l2pauth():
...
@@ -23,6 +25,8 @@ def start_l2pauth():
@app.route
(
'
/rwthauth
'
)
@app.route
(
'
/rwthauth
'
)
def
start_rwthauth
():
def
start_rwthauth
():
if
'
L2P_APIKEY
'
not
in
config
:
return
render_template
(
"
500.html
"
),
500
code
=
oauthget
(
'
code
'
,
scope
=
'
userinfo.rwth
'
)
code
=
oauthget
(
'
code
'
,
scope
=
'
userinfo.rwth
'
)
session
[
'
oauthcode
'
]
=
code
[
'
device_code
'
]
session
[
'
oauthcode
'
]
=
code
[
'
device_code
'
]
session
[
'
oauthscope
'
]
=
'
rwth
'
session
[
'
oauthscope
'
]
=
'
rwth
'
...
@@ -30,6 +34,8 @@ def start_rwthauth():
...
@@ -30,6 +34,8 @@ def start_rwthauth():
@app.before_request
@app.before_request
def
finish_oauth
():
def
finish_oauth
():
if
'
L2P_APIKEY
'
not
in
config
:
return
if
'
oauthcode
'
not
in
session
or
'
oauthscope
'
not
in
session
:
if
'
oauthcode
'
not
in
session
or
'
oauthscope
'
not
in
session
:
return
return
token
=
oauthget
(
'
token
'
,
code
=
session
[
'
oauthcode
'
],
grant_type
=
'
device
'
)
token
=
oauthget
(
'
token
'
,
code
=
session
[
'
oauthcode
'
],
grant_type
=
'
device
'
)
...
...
This diff is collapsed.
Click to expand it.
server.py
+
1
−
2
View file @
a2f16da8
...
@@ -592,7 +592,6 @@ import importer
...
@@ -592,7 +592,6 @@ import importer
import
sorter
import
sorter
if
'
ICAL_URL
'
in
config
:
if
'
ICAL_URL
'
in
config
:
import
meetings
import
meetings
if
'
L2P_APIKEY
'
in
config
:
import
l2pauth
import
l2pauth
import
jobs
import
jobs
import
timetable
import
timetable
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