-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from kevgliss/keys
Switch to relying on the configuration key in the configuration file
- Loading branch information
Showing
3 changed files
with
26 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
""" | ||
.. module: lemur.utils | ||
:platform: Unix | ||
:copyright: (c) 2015 by Netflix Inc., see AUTHORS for more | ||
:license: Apache, see LICENSE for more details. | ||
.. moduleauthor:: Kevin Glisson <kglisson@netflix.com> | ||
""" | ||
from flask import current_app | ||
|
||
|
||
def get_key(): | ||
""" | ||
Gets the current encryption key | ||
:return: | ||
""" | ||
try: | ||
return current_app.config.get('LEMUR_ENCRYPTION_KEY') | ||
except RuntimeError: | ||
return '' |