mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-16 21:37:59 +08:00
* add oauth authentication Add support for OAuth2. Change the interface to AuthTypeBase - better handling of config parameters - add a complete_setup function for additional setup steps Added a function wrapper to enforce authentication for the routes that require authenticaiton. * change fsspec requirement fsspec 0.8.0 breaks our tests it imports a module that is does not require.
29 lines
528 B
Python
29 lines
528 B
Python
from server.auth.auth import AuthTypeBase, AuthTypeFactory
|
|
|
|
|
|
class AuthTypeNone(AuthTypeBase):
|
|
|
|
def __init__(self, app_config):
|
|
super().__init__()
|
|
|
|
def is_valid_authentication_type(self):
|
|
return False
|
|
|
|
def complete_setup(self, app):
|
|
pass
|
|
|
|
def is_user_authenticated(self):
|
|
return True
|
|
|
|
def get_user_id(self):
|
|
return None
|
|
|
|
def get_user_name(self):
|
|
return None
|
|
|
|
def get_user_email(self):
|
|
return None
|
|
|
|
|
|
AuthTypeFactory.register(None, AuthTypeNone)
|