oauth2 instead of oauth

This commit is contained in:
mahdavi 2020-06-09 22:23:07 +04:30
parent c74d60af69
commit 44d55487be
12 changed files with 6 additions and 6 deletions

View file

@ -2,4 +2,4 @@ from django.apps import AppConfig
class GooyalOauthConfig(AppConfig):
name = 'apps.gooyal_oauth'
name = 'apps.gooyal_oauth2'

View file

@ -8,7 +8,7 @@ import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('gooyal_oauth', '0001_initial'),
('gooyal_oauth2', '0001_initial'),
]
operations = [

View file

@ -44,7 +44,7 @@ INSTALLED_APPS = [
'apps.transactions',
# 'apps.gooyal_restrict_scopes',
# 'apps.gooyal_dynamic_scopes',
'apps.gooyal_oauth',
'apps.gooyal_oauth2',
]
MIDDLEWARE = [
@ -59,19 +59,19 @@ MIDDLEWARE = [
]
# Tell Django OAuth Toolkit to use the Gooyal Application model
OAUTH2_PROVIDER_APPLICATION_MODEL = 'gooyal_oauth.Application'
OAUTH2_PROVIDER_APPLICATION_MODEL = 'gooyal_oauth2.Application'
OAUTH2_PROVIDER_ACCESS_TOKEN_MODEL = 'oauth2_provider.AccessToken'
OAUTH2_PROVIDER_GRANT_MODEL = 'oauth2_provider.Grant'
OAUTH2_PROVIDER_REFRESH_TOKEN_MODEL = 'oauth2_provider.RefreshToken'
OAUTH2_PROVIDER = {
# this is the list of available scopes
'SCOPES_BACKEND_CLASS': 'apps.gooyal_oauth.scopes.Scopes',
'SCOPES_BACKEND_CLASS': 'apps.gooyal_oauth2.scopes.Scopes',
'SCOPES': {'read': 'Read scope',
'write': 'Write scope',
'groups': 'Access to your groups',
'introspection': 'Introspect token scope'},
'OAUTH2_VALIDATOR_CLASS': 'apps.gooyal_oauth.validators.MultiGatewayOAuth2Validator'
'OAUTH2_VALIDATOR_CLASS': 'apps.gooyal_oauth2.validators.MultiGatewayOAuth2Validator'
}
# GOOYAL_RESTRICT_SCOPES = {