openedx.core.djangoapps.oauth_dispatch.adapters package#

Submodules#

openedx.core.djangoapps.oauth_dispatch.adapters.dot module#

Adapter to isolate django-oauth-toolkit dependencies

class openedx.core.djangoapps.oauth_dispatch.adapters.dot.DOTAdapter#

Bases: object

Standard interface for working with django-oauth-toolkit

FILTER_USER_ME = 'user:me'#
backend = <object object>#
create_access_token_for_test(token_string, client, user, expires)#

Returns a new AccessToken object created from the given arguments. This method is currently used only by tests.

create_confidential_client(name, user, redirect_uri, client_id=None, authorization_grant_type='authorization-code')#

Create an oauth client application that is confidential.

create_public_client(name, user, redirect_uri, client_id=None, grant_type='password')#

Create an oauth client application that is public.

get_access_token(token_string)#

Given a token string, return the matching AccessToken object.

get_authorization_filters(client)#

Get the authorization filters for the given client application.

get_client(**filters)#

Get the oauth client application with the specified filters.

Wraps django’s queryset.get() method.

get_client_for_token(token)#

Given an AccessToken object, return the associated client application.

get_token_scope_names(token)#

Given an access token object, return its scopes.

is_client_restricted(client)#

Returns true if the client is set up as a RestrictedApplication.

Module contents#

Adapters to provide a common interface to django-oauth2-provider (DOP) and django-oauth-toolkit (DOT).