Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
from tornado.auth import OAuth2Mixin
from tornado import gen, web
from traitlets.config import LoggingConfigurable
from oauthenticator import OAuthLoginHandler, OAuthenticator
from .CarinaOAuthClient import CarinaOAuthClient
class CarinaLoginHandler(OAuthLoginHandler, OAuth2Mixin):
"""
Carina OAuth dance magic
"""
_OAUTH_AUTHORIZE_URL = CarinaOAuthClient.CARINA_AUTHORIZE_URL
_OAUTH_ACCESS_TOKEN_URL = CarinaOAuthClient.CARINA_TOKEN_URL
scope = ['identity', 'read', 'write', 'execute']
class CarinaAuthenticator(OAuthenticator, LoggingConfigurable):
"""
Authenticate users with their Carina account
"""
# Configure the base OAuthenticator