diff options
| author | Frederick Muriuki Muriithi | 2022-12-19 16:02:19 +0300 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2022-12-22 09:05:53 +0300 |
| commit | b0641272491eb51d321b1b8a7d062e395e70800f (patch) | |
| tree | c9b2065ea60399579c4c4d84c648b61ed67402ba /gn3/app.py | |
| parent | e9031e28594fcd21371adb2b9b26e17a1df95599 (diff) | |
| download | genenetwork3-b0641272491eb51d321b1b8a7d062e395e70800f.tar.gz | |
auth: implement OAuth2 flow. oauth2_auth_flow
Add code to implement the OAuth2 flow. * Add test fixtures for setting up users and OAuth2 clients * Add tests for token generation with the "Password Grant" flow * Fix some issues with test due to changes in the database connection's row_factory
Diffstat (limited to 'gn3/app.py')
| -rw-r--r-- | gn3/app.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gn3/app.py b/gn3/app.py index a187e54..b776351 100644 --- a/gn3/app.py +++ b/gn3/app.py @@ -19,6 +19,8 @@ from gn3.api.async_commands import async_commands from gn3.api.menu import menu from gn3.api.search import search from gn3.api.metadata import metadata +from gn3.auth.authentication.oauth2.views import oauth2 +from gn3.auth.authentication.oauth2.server import setup_oauth2_server def create_app(config: Union[Dict, str, None] = None) -> Flask: @@ -56,4 +58,7 @@ def create_app(config: Union[Dict, str, None] = None) -> Flask: app.register_blueprint(menu, url_prefix="/api/menu") app.register_blueprint(search, url_prefix="/api/search") app.register_blueprint(metadata, url_prefix="/api/metadata") + app.register_blueprint(oauth2, url_prefix="/api/oauth2") + + setup_oauth2_server(app) return app |
