Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sso
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ai
sso
Commits
d4f71167
Commit
d4f71167
authored
Mar 30, 2014
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
formatting
parent
68759f29
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
src/sso_server/sso_server/application.py
src/sso_server/sso_server/application.py
+17
-17
No files found.
src/sso_server/sso_server/application.py
View file @
d4f71167
...
...
@@ -163,18 +163,18 @@ def logout():
def
create_app
(
config_file
=
None
,
config
=
{}):
# Some defaults for our configuration.
app
.
config
.
update
({
'SSO_SECRET_KEY'
:
'/etc/sso/secret.key'
,
'SSO_PUBLIC_KEY'
:
'/etc/sso/public.key'
,
'SSO_AUTH_MODULE'
:
'sso_server.auth.auth_test'
,
'HTML_TITLE'
:
'SSO'
,
'HTML_BANNER'
:
'Single Sign-On'
,
})
'SSO_SECRET_KEY'
:
'/etc/sso/secret.key'
,
'SSO_PUBLIC_KEY'
:
'/etc/sso/public.key'
,
'SSO_AUTH_MODULE'
:
'sso_server.auth.auth_test'
,
'HTML_TITLE'
:
'SSO'
,
'HTML_BANNER'
:
'Single Sign-On'
,
})
# Set saner defaults for Flask session config.
app
.
config
.
update
({
'SESSION_COOKIE_HTTPONLY'
:
True
,
'SESSION_COOKIE_SECURE'
:
True
,
})
'SESSION_COOKIE_HTTPONLY'
:
True
,
'SESSION_COOKIE_SECURE'
:
True
,
})
# Load the user-provided configuration.
app
.
config
.
update
(
config
)
...
...
@@ -183,14 +183,6 @@ def create_app(config_file=None, config={}):
else
:
app
.
config
.
from_envvar
(
'APP_CONFIG'
,
silent
=
True
)
# Optionally enable Sentry.
if
'SENTRY_DSN'
in
app
.
config
:
try
:
from
raven.contrib.flask
import
Sentry
sentry
=
Sentry
(
app
)
except
ImportError
:
pass
# Check configuration for required attributes.
required_attrs
=
[
'SSO_DOMAIN'
,
'SSO_SECRET_KEY'
,
'SSO_PUBLIC_KEY'
,
'SSO_AUTH_MODULE'
]
...
...
@@ -199,6 +191,14 @@ def create_app(config_file=None, config={}):
raise
Exception
(
'Missing required configuration attributes: %s'
,
', '
.
join
(
missing_attrs
))
# Optionally enable Sentry.
if
'SENTRY_DSN'
in
app
.
config
:
try
:
from
raven.contrib.flask
import
Sentry
sentry
=
Sentry
(
app
)
except
ImportError
:
pass
app
.
login_service
=
login_service
.
LoginService
(
app
.
config
)
return
app
...
...
Write
Preview
Markdown
is supported
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