Did I find the right examples for you? yes no

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)

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
        if ldap_validate(username, password):
            logger.info("LDAP User %s validated. Creating auth token" % username)
            token = createAuthToken(username)
            expireTime = token.issuedTime + secrets.TOKEN_EXPIRY_TIME
            auth_json = {
    if cas_validateUser(username):
        logger.info("CAS User %s validated. Creating auth token" % username)
        token = createAuthToken(username)
        expireTime = token.issuedTime + secrets.TOKEN_EXPIRY_TIME
        auth_json = {

src/a/t/atmosphere-HEAD/authentication/protocol/cas.py   atmosphere(Download)
from atmosphere import settings
 
from authentication import createAuthToken
from authentication.models import UserProxy
 
 
    try:
        auth_token = createAuthToken(user)
    except User.DoesNotExist:
        return HttpResponseRedirect(no_user_url)