Did I find the right examples for you? yes no

All Samples(11)  |  Call(8)  |  Derive(0)  |  Import(3)

src/a/t/atmosphere-HEAD/web/views.py   atmosphere(Download)
from atmosphere import settings
 
from authentication import cas_loginRedirect, cas_logoutRedirect
from authentication.models import Token as AuthToken
from authentication.decorators import atmo_login_required, atmo_valid_token_required
def redirectApp(request):
    """
    Redirects to /application if user is authorized, otherwise forces a login
    """
    return cas_loginRedirect(request,
 
    if 'next' in request.POST:
        return cas_loginRedirect(request,
                                 settings.REDIRECT_URL+'/application/')
    else:
    except KeyError, e:
        logger.debug("User not logged in.. Redirecting to CAS login")
        return cas_loginRedirect(request, settings.REDIRECT_URL+'/application')
    except Exception, e:
        logger.exception(e)
        return cas_loginRedirect(request, settings.REDIRECT_URL+'/application')

src/a/t/atmosphere-HEAD/authentication/views.py   atmosphere(Download)
from atmosphere import settings
from atmosphere.settings import secrets
from authentication import createAuthToken, validateToken,\
    userCanEmulate, cas_loginRedirect
from authentication.models import Token as AuthToken
        #The user and password were not found
        #force user to login via CAS
        return cas_loginRedirect(request, '/auth/')
 
    #CAS Authenticate by Proxy (Password not necessary):

src/a/t/atmosphere-HEAD/authentication/decorators.py   atmosphere(Download)
from atmosphere import settings
 
from authentication import cas_loginRedirect
from authentication.token import validate_token
 
            logger.info("Could not authenticate user %s" % username)
            #logger.debug("%s\n%s\n%s\n%s" % (request, args, kwargs, func))
            return cas_loginRedirect(request, redirect)
        django_login(request, user)
        return func(request, *args, **kwargs)