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

All Samples(18)  |  Call(11)  |  Derive(0)  |  Import(7)

src/c/a/captain-HEAD/vendor/lib/python/django_browserid/auth.py   captain(Download)
    from django.utils.encoding import smart_str as smart_bytes
 
from django_browserid.base import verify
from django_browserid.signals import user_created
from django_browserid.util import import_function_from_setting
        See django_browserid.base.get_audience()
        """
        result = verify(assertion, audience, extra_params=browserid_extra)
        if not result:
            return None

src/w/w/wwwhisper-HEAD/wwwhisper_auth/backend.py   wwwhisper(Download)
from django.contrib.auth.backends import ModelBackend
from django.forms import ValidationError
from django_browserid.base import verify
from models import LimitExceeded
 
            AssertionVerificationException: verification failed.
        """
        result = verify(assertion=assertion, audience=site_url)
        if not result:
            # TODO: different error if Persona is down.

src/m/o/mozillians-HEAD/mozillians/phonebook/views.py   mozillians(Download)
from django.views.decorators.http import require_POST
 
from django_browserid.base import get_audience, verify
from django_browserid.views import Verify
from funfactory.helpers import urlparams
        self.assertion = form.cleaned_data['assertion']
        self.audience = get_audience(self.request)
        result = verify(self.assertion, self.audience)
        if not result:
            messages.error(self.request, _('Authentication failed.'))

src/d/j/django-mongo-auth-0.1.2/mongo_auth/backends.py   django-mongo-auth(Download)
    def authenticate(self, browserid_assertion=None, browserid_audience=None, request=None):
        browserid_profile_data = browserid_base.verify(browserid_assertion, browserid_audience)
        if not browserid_profile_data or 'email' not in browserid_profile_data:
            return None
 

src/d/j/django-mongo-auth-HEAD/mongo_auth/backends.py   django-mongo-auth(Download)
    def authenticate(self, browserid_assertion=None, browserid_audience=None, request=None):
        browserid_profile_data = browserid_base.verify(browserid_assertion, browserid_audience)
        if not browserid_profile_data or 'email' not in browserid_profile_data:
            return None
 

src/c/a/captain-HEAD/vendor/lib/python/django_browserid/__init__.py   captain(Download)
 
from django_browserid.auth import BrowserIDBackend  # NOQA
from django_browserid.base import BrowserIDException, get_audience, verify  # NOQA
 

src/c/a/captain-HEAD/vendor/lib/python/django_browserid/tests/test_base.py   captain(Download)
from requests.exceptions import RequestException
 
from django_browserid.base import BrowserIDException, get_audience, verify
from django_browserid.tests import patch_settings
 
    def test_basic_success(self):
        self.post.return_value.content = """
            {"status": "okay", "email": "a@example.com"}
        """
        result = verify('asdf', 'http://testserver/')
    def test_custom_settings(self):
        verify('asdf', 'http://testserver/')
        self.post.assert_called_with(
            'http://example.org',
            data={'assertion': 'asdf', 'audience': 'http://testserver/'},
    def test_custom_url(self):
        # If a custom URL is passed into verify, send the verification request
        # to that URL.
        verify('asdf', 'http://testserver/', url='https://example.com')
        self.post.assert_called_with(
    def test_extra_params(self):
        # If extra params are passed into verify, they should be included with
        # the other POST arguments in the verification tests.
        verify('asdf', 'http://testserver/', extra_params={'a': 'b', 'c': 'd'})
        expected_data = {

src/p/o/popcorn_maker-HEAD/vendor-local/lib/python/django_browserid/auth.py   popcorn_maker(Download)
from django.utils.importlib import import_module
 
from django_browserid.base import get_audience as base_get_audience, verify
 
log = logging.getLogger(__name__)

src/p/o/popcorn_maker-HEAD/vendor-local/lib/python/django_browserid/__init__.py   popcorn_maker(Download)
from django_browserid.auth import BrowserIDBackend
from django_browserid.base import get_audience, verify