Did I find the right examples for you? yes no

All Samples(6)  |  Call(4)  |  Derive(0)  |  Import(2)

src/a/t/atmosphere-HEAD/authentication/authBackends.py   atmosphere(Download)
from threepio import logger
 
from authentication import get_or_create_user
from authentication.protocol.ldap import ldap_validate, ldap_formatAttrs
from authentication.protocol.ldap import lookupUser as ldap_lookupUser
            return None
        attributes = cas_formatAttrs(cas_response)
        return get_or_create_user(username, attributes)
 
 
        ldap_attrs = ldap_lookupUser(username)
        attributes = ldap_formatAttrs(ldap_attrs)
        return get_or_create_user(username, attributes)
 
 
        attributes = oauth_formatAttrs(oauth_attrs)
        logger.debug("[OAUTH] Authentication Success - " + valid_user)
        return get_or_create_user(valid_user, attributes)
 

src/a/t/atmosphere-HEAD/authentication/protocol/oauth.py   atmosphere(Download)
from atmosphere.settings import secrets
from atmosphere import settings
from authentication import get_or_create_user
from authentication.models import Token as AuthToken
from django.utils.timezone import datetime, timedelta
def create_user(username):
    oauth_attrs = lookupUser(username)
    attributes = oauth_formatAttrs(oauth_attrs)
    user = get_or_create_user(valid_user, attributes)
    return user