Example #1
0
        def login():
            self.default_return_to = gourl()
            redirector = self.mwoauth.authorize()

            if 'next' in request.args:
                oauth_token = session[self.mwoauth.name + '_oauthtok'][0]
                session[oauth_token + '_target'] = request.args['next']
            redirector.headers['Location'] += "&oauth_consumer_key=" + self.mwoauth.consumer_key
            return redirector
Example #2
0
        def login():
            self.default_return_to = gourl()
            redirector = self.mwoauth.authorize()

            if 'next' in request.args:
                oauth_token = session[self.mwoauth.name + '_oauthtok'][0]
                session[oauth_token + '_target'] = request.args['next']
            redirector.headers[
                'Location'] += "&oauth_consumer_key=" + self.mwoauth.consumer_key
            return redirector
Example #3
0
def error404(e):
    return render('errors/404.html', url=gourl())
Example #4
0
 def logout():
     session['mwo_token'] = None
     session['username'] = None
     return redirect(gourl())
Example #5
0
def error404(e):
    return render("errors/404.html", url=gourl())
Example #6
0
 def logout():
     session['mwo_token'] = None
     session['username'] = None
     return redirect(gourl())