oauth2 instead of oauth
This commit is contained in:
parent
c74d60af69
commit
44d55487be
12 changed files with 6 additions and 6 deletions
|
|
@ -2,4 +2,4 @@ from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
class GooyalOauthConfig(AppConfig):
|
class GooyalOauthConfig(AppConfig):
|
||||||
name = 'apps.gooyal_oauth'
|
name = 'apps.gooyal_oauth2'
|
||||||
|
|
@ -8,7 +8,7 @@ import django.db.models.deletion
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('gooyal_oauth', '0001_initial'),
|
('gooyal_oauth2', '0001_initial'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
|
|
@ -44,7 +44,7 @@ INSTALLED_APPS = [
|
||||||
'apps.transactions',
|
'apps.transactions',
|
||||||
# 'apps.gooyal_restrict_scopes',
|
# 'apps.gooyal_restrict_scopes',
|
||||||
# 'apps.gooyal_dynamic_scopes',
|
# 'apps.gooyal_dynamic_scopes',
|
||||||
'apps.gooyal_oauth',
|
'apps.gooyal_oauth2',
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
|
|
@ -59,19 +59,19 @@ MIDDLEWARE = [
|
||||||
]
|
]
|
||||||
|
|
||||||
# Tell Django OAuth Toolkit to use the Gooyal Application model
|
# 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_ACCESS_TOKEN_MODEL = 'oauth2_provider.AccessToken'
|
||||||
OAUTH2_PROVIDER_GRANT_MODEL = 'oauth2_provider.Grant'
|
OAUTH2_PROVIDER_GRANT_MODEL = 'oauth2_provider.Grant'
|
||||||
OAUTH2_PROVIDER_REFRESH_TOKEN_MODEL = 'oauth2_provider.RefreshToken'
|
OAUTH2_PROVIDER_REFRESH_TOKEN_MODEL = 'oauth2_provider.RefreshToken'
|
||||||
|
|
||||||
OAUTH2_PROVIDER = {
|
OAUTH2_PROVIDER = {
|
||||||
# this is the list of available scopes
|
# 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',
|
'SCOPES': {'read': 'Read scope',
|
||||||
'write': 'Write scope',
|
'write': 'Write scope',
|
||||||
'groups': 'Access to your groups',
|
'groups': 'Access to your groups',
|
||||||
'introspection': 'Introspect token scope'},
|
'introspection': 'Introspect token scope'},
|
||||||
'OAUTH2_VALIDATOR_CLASS': 'apps.gooyal_oauth.validators.MultiGatewayOAuth2Validator'
|
'OAUTH2_VALIDATOR_CLASS': 'apps.gooyal_oauth2.validators.MultiGatewayOAuth2Validator'
|
||||||
}
|
}
|
||||||
|
|
||||||
# GOOYAL_RESTRICT_SCOPES = {
|
# GOOYAL_RESTRICT_SCOPES = {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue