Did I find the right examples for you? yes no

All Samples(20)  |  Call(6)  |  Derive(0)  |  Import(14)

src/d/j/django-oauth-toolkit-HEAD/oauth2_provider/oauth2_validators.py   django-oauth-toolkit(Download)
 
from .compat import unquote_plus
from .models import Grant, AccessToken, RefreshToken, get_application_model
from .settings import oauth2_settings
 
    def save_authorization_code(self, client_id, code, request, *args, **kwargs):
        expires = timezone.now() + timedelta(
            seconds=oauth2_settings.AUTHORIZATION_CODE_EXPIRE_SECONDS)
        g = Grant(application=request.client, user=request.user, code=code['code'],
                  expires=expires, redirect_uri=request.redirect_uri,

src/d/j/django-oauth-toolkit-0.7.1/oauth2_provider/oauth2_validators.py   django-oauth-toolkit(Download)
 
from .compat import unquote_plus
from .models import Grant, AccessToken, RefreshToken, get_application_model
from .settings import oauth2_settings
 
    def save_authorization_code(self, client_id, code, request, *args, **kwargs):
        expires = timezone.now() + timedelta(
            seconds=oauth2_settings.AUTHORIZATION_CODE_EXPIRE_SECONDS)
        g = Grant(application=request.client, user=request.user, code=code['code'],
                  expires=expires, redirect_uri=request.redirect_uri,

src/d/j/django-oauth-toolkit-HEAD/oauth2_provider/tests/test_authorization_code.py   django-oauth-toolkit(Download)
 
from ..compat import urlparse, parse_qs, urlencode, get_user_model
from ..models import get_application_model, Grant, AccessToken
from ..settings import oauth2_settings
from ..views import ProtectedResourceView
        """
        self.client.login(username="test_user", password="123456")
        g = Grant(application=self.application, user=self.test_user, code='BLAH', expires=timezone.now(),
                  redirect_uri='', scope='')
        g.save()

src/d/j/django-oauth-toolkit-0.7.1/oauth2_provider/tests/test_authorization_code.py   django-oauth-toolkit(Download)
 
from ..compat import urlparse, parse_qs, urlencode, get_user_model
from ..models import get_application_model, Grant, AccessToken
from ..settings import oauth2_settings
from ..views import ProtectedResourceView
        """
        self.client.login(username="test_user", password="123456")
        g = Grant(application=self.application, user=self.test_user, code='BLAH', expires=timezone.now(),
                  redirect_uri='', scope='')
        g.save()

src/d/j/django-oauth-toolkit-HEAD/oauth2_provider/admin.py   django-oauth-toolkit(Download)
from django.contrib import admin
 
from .models import Grant, AccessToken, RefreshToken, get_application_model
 
class RawIDAdmin(admin.ModelAdmin):

src/d/j/django-oauth-toolkit-0.7.1/oauth2_provider/admin.py   django-oauth-toolkit(Download)
from django.contrib import admin
 
from .models import Grant, AccessToken, RefreshToken, get_application_model
 
class RawIDAdmin(admin.ModelAdmin):

src/d/j/django-oauth2-provider-0.2.6.1/provider/oauth2/admin.py   django-oauth2-provider(Download)
from django.contrib import admin
from .models import AccessToken, Grant, Client, RefreshToken
 
 
class AccessTokenAdmin(admin.ModelAdmin):

src/d/j/django-oauth2-provider-HEAD/provider/oauth2/admin.py   django-oauth2-provider(Download)
from django.contrib import admin
from .models import AccessToken, Grant, Client, RefreshToken
 
 
class AccessTokenAdmin(admin.ModelAdmin):

src/d/j/django-oauth2-provider-0.2.6.1/provider/oauth2/forms.py   django-oauth2-provider(Download)
from ..scope import SCOPE_NAMES
from ..utils import now
from .models import Client, Grant, RefreshToken
 
 
            return None
 
        grant = Grant()
        grant.scope = self.cleaned_data.get('scope')
        return grant

src/d/j/django-oauth2-provider-HEAD/provider/oauth2/forms.py   django-oauth2-provider(Download)
from ..scope import SCOPE_NAMES
from ..utils import now
from .models import Client, Grant, RefreshToken
 
 
            return None
 
        grant = Grant()
        grant.scope = self.cleaned_data.get('scope')
        return grant

  1 | 2  Next