<s> from __future__ import unicode_literals <EOL> from flask_dance . consumer import OAuth2ConsumerBlueprint <EOL> from functools import partial <EOL> from flask . globals import LocalProxy , _lookup_app_object <EOL> try : <EOL> from flask import _app_ctx_stack as stack <EOL> except ImportError : <EOL> from flask import _request_ctx_stack as stack <EOL> __maintainer__ = "<STR_LIT>" <EOL> def make_github_blueprint ( <EOL> client_id = None , client_secret = None , scope = None , redirect_url = None , <EOL> redirect_to = None , login_url = None , authorized_url = None , <EOL> session_class = None , backend = None ) : <EOL> """<STR_LIT>""" <EOL> github_bp = OAuth2ConsumerBlueprint ( "<STR_LIT>" , __name__ , <EOL> client_id = client_id , <EOL> client_secret = client_secret , <EOL> scope = scope , <EOL> base_url = "<STR_LIT>" , <EOL> authorization_url = "<STR_LIT>" , <EOL> token_url = "<STR_LIT>" , <EOL> redirect_url = redirect_url , <EOL> redirect_to = redirect_to , <EOL> login_url = login_url , <EOL> authorized_url = authorized_url , <EOL> session_class = session_class , <EOL> backend = backend , <EOL> ) <EOL> github_bp . from_config [ "<STR_LIT>" ] = "<STR_LIT>" <EOL> github_bp . from_config [ "<STR_LIT>" ] = "<STR_LIT>" <EOL> @ github_bp . before_app_request <EOL> def set_applocal_session ( ) : <EOL> ctx = stack . top <EOL> ctx . github_oauth = github_bp . session <EOL> return github_bp <EOL> github = LocalProxy ( partial ( _lookup_app_object , "<STR_LIT>" ) ) </s>
