-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jiri Kuncar <[email protected]>
- Loading branch information
1 parent
9784ad9
commit ac97ed2
Showing
46 changed files
with
1,951 additions
and
153 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 |
---|---|---|
|
@@ -21,10 +21,20 @@ | |
waive the privileges and immunities granted to it by virtue of its status | ||
as an Intergovernmental Organization or submit itself to any jurisdiction. | ||
|
||
|
||
Authors | ||
======= | ||
|
||
Invenio module that implements OAuth 2 server. | ||
|
||
- CERN <[email protected]> | ||
- Charlotte Cattaneo <[email protected]> | ||
- Eirini Psallida <[email protected]> | ||
- Esteban J. G. Gabancho <[email protected]> | ||
- Ivan Masár <[email protected]> | ||
- Jiri Kuncar <[email protected]> | ||
- Konstantinos Kostis <[email protected]> | ||
- Lars Holm Nielsen <[email protected]> | ||
- Leonardo Rossi <[email protected]> | ||
- Marco Neumann <[email protected]> | ||
- Roman Chyla <[email protected]> | ||
- Sami Hiltunen <[email protected]> | ||
- Tibor Simko <[email protected]> |
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
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 |
---|---|---|
|
@@ -44,6 +44,3 @@ | |
app = Flask(__name__) | ||
Babel(app) | ||
InvenioOAuth2Server(app) | ||
|
||
if __name__ == "__main__": | ||
app.run() |
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,63 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# This file is part of Invenio. | ||
# Copyright (C) 2014, 2015 CERN. | ||
# | ||
# Invenio is free software; you can redistribute it | ||
# and/or modify it under the terms of the GNU General Public License as | ||
# published by the Free Software Foundation; either version 2 of the | ||
# License, or (at your option) any later version. | ||
# | ||
# Invenio is distributed in the hope that it will be | ||
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
# General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with Invenio; if not, write to the | ||
# Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
# MA 02111-1307, USA. | ||
# | ||
# In applying this license, CERN does not | ||
# waive the privileges and immunities granted to it by virtue of its status | ||
# as an Intergovernmental Organization or submit itself to any jurisdiction. | ||
|
||
"""OAuth2Server configuration variables.""" | ||
|
||
OAUTH2_CACHE_TYPE = 'redis' | ||
""" Type of cache to use for storing the temporary grant token """ | ||
|
||
OAUTH2_PROVIDER_ERROR_ENDPOINT = 'oauth2server.errors' | ||
""" Error view endpoint """ | ||
|
||
OAUTH2_PROVIDER_TOKEN_EXPIRES_IN = 3600 | ||
""" Life time of an access token """ | ||
|
||
OAUTH2_CLIENT_ID_SALT_LEN = 40 | ||
""" Length of client id """ | ||
|
||
OAUTH2_CLIENT_SECRET_SALT_LEN = 60 | ||
""" Length of the client secret """ | ||
|
||
OAUTH2_TOKEN_PERSONAL_SALT_LEN = 60 | ||
""" Length of the personal access token """ | ||
|
||
OAUTH2_ALLOWED_GRANT_TYPES = [ | ||
'authorization_code', 'client_credentials', 'refresh_token', | ||
] | ||
""" | ||
A list of allowed grant types - allowed values are `authorization_code`, | ||
`password`, `client_credentials`, `refresh_token`). By default password is | ||
disabled, as it requires the client application to gain access to the username | ||
and password of the resource owner | ||
""" | ||
|
||
OAUTH2_ALLOWED_RESPONSE_TYPES = [ | ||
"code", "token" | ||
] | ||
""" | ||
A list of allowed response types - allowed values are `code` and `token`. | ||
- ``code`` is used for authorization_code grant types | ||
- ``token`` is used for implicit grant types | ||
""" |
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
Oops, something went wrong.