Skip to content

Commit

Permalink
OAuth2.0 initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
VJalili committed Aug 7, 2017
1 parent 4a7045c commit f88c8c3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/galaxy/webapps/galaxy/buildapp.py
Expand Up @@ -76,6 +76,10 @@ def paste_app_factory( global_conf, **kwargs ):
# Force /activate to go to the controller
webapp.add_route( '/activate', controller='user', action='activate' )

# OAuth2.0 endpoints.
webapp.add_route('/verify', controller='oauth2', action='authenticate')
webapp.add_route('/oauth2callback', controller='oauth2', action='callback')

# These two routes handle our simple needs at the moment
webapp.add_route( '/async/{tool_id}/{data_id}/{data_secret}', controller='async', action='index', tool_id=None, data_id=None, data_secret=None )
webapp.add_route( '/{controller}/{action}', action='index' )
Expand Down
22 changes: 22 additions & 0 deletions lib/galaxy/webapps/galaxy/controllers/oauth2.py
@@ -0,0 +1,22 @@
"""
OAuth 2.0 and OpenID Connect Authentication and Authorization Controller.
"""

from __future__ import absolute_import
import logging
log = logging.getLogger(__name__)
from galaxy import web
from galaxy.web.base.controller import BaseUIController
from oauth2client import client
import requests
import hashlib

class OAuth2( BaseUIController ):

@web.expose
def authenticate(self, trans, **kwargs):
return

@web.expose
def callback(self, trans, **kwargs):
return

0 comments on commit f88c8c3

Please sign in to comment.