Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(10)  |  Call(5)  |  Derive(0)  |  Import(5)
This returns ``True`` if the current login is fresh.

        def login_fresh():
    '''
    This returns ``True`` if the current login is fresh.
    '''
    return session.get('_fresh', False)
        


src/d/p/dpxdt-HEAD/dpxdt/server/auth.py   dpxdt(Download)
import flask
from flask import abort, g, redirect, render_template, request, url_for
from flask.ext.login import (
    confirm_login, current_user, fresh_login_required, login_fresh,
    login_required, login_user, logout_user)
            logging.debug('Redirecting user to login to get build access')
            abort(login.unauthorized())
    elif not login_fresh():
        logging.debug('User login is old; forcing refresh')
        abort(login.needs_refresh())

src/f/l/flaskbb-HEAD/flaskbb/auth/views.py   flaskbb(Download)
"""
from flask import Blueprint, flash, redirect, url_for, request, current_app
from flask.ext.login import (current_user, login_user, login_required,
                             logout_user, confirm_login, login_fresh)
 
    """
 
    if not login_fresh():
        form = ReauthForm(request.form)
        if form.validate_on_submit():

src/d/p/dpxdt-HEAD/dpxdt/server/frontend.py   dpxdt(Download)
import flask
from flask import Flask, abort, g, redirect, render_template, request, url_for
from flask.ext.login import (
    current_user, fresh_login_required, login_fresh, login_required)
from flask.ext.wtf import Form
def homepage():
    """Renders the homepage."""
    if current_user.is_authenticated():
        if not login_fresh():
            logging.debug('User needs a fresh token')

src/b/r/breezeminder-HEAD/breezeminder/views/auth.py   breezeminder(Download)
                   session,
                   url_for)
from flask.ext.login import (current_user,
                             logout_user,
                             login_fresh)
def login():
    if current_user is not None and current_user.is_authenticated() and login_fresh():
        return redirect_next()
    else:
        form = LoginForm(request.form)

src/f/l/flask-login-HEAD/test_login.py   flask-login(Download)
from flask import Flask, Response, session, get_flashed_messages
 
from flask.ext.login import (LoginManager, UserMixin, AnonymousUserMixin,
                             make_secure_token, current_user, login_user,
                             logout_user, user_logged_in, user_logged_out,
        def is_fresh():
            return unicode(login_fresh())
 
        @self.app.route('/logout')
        def logout():