oauth2 not working
This commit is contained in:
@@ -237,10 +237,10 @@ handler500 = views.error500_view
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
re_path(r'^oauth2/', include('provider.oauth2.urls', namespace = 'oauth2')),
|
||||
# re_path(r'^oauth2/', include('provider.oauth2.urls', namespace = 'oauth2')),
|
||||
# re_path(r'^o/authorize/$', base.AuthorizationView.as_view(), name="authorize"),
|
||||
# re_path(r'^o/token/$', base.TokenView.as_view(), name="token"),
|
||||
path('o/', include('oauth2_provider.urls', namespace='oauth2_provider')),
|
||||
re_path('^o/', include('oauth2_provider.urls', namespace='oauth2_provider')),
|
||||
re_path(r'^', include(router.urls)),
|
||||
re_path(r'^api-docs/$', views.schema_view, name='schema_view'),
|
||||
re_path(r'^api-auth/', include('rest_framework.urls',
|
||||
|
||||
@@ -72,8 +72,8 @@ INSTALLED_APPS = [
|
||||
'datetimewidget',
|
||||
'rest_framework_swagger',
|
||||
'oauth2_provider',
|
||||
#'provider',
|
||||
#'provider.oauth2',
|
||||
# 'provider',
|
||||
# 'provider.oauth2',
|
||||
'corsheaders',
|
||||
'analytical',
|
||||
'cookielaw',
|
||||
@@ -194,6 +194,8 @@ DATABASES = {
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
|
||||
|
||||
AUTH_USER_MLDEL = 'user.User'
|
||||
|
||||
AUTH_PASSWORD_VALIDATORS = [
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
||||
@@ -456,7 +458,7 @@ OAUTH2_PROVIDER = {
|
||||
'ACCESS_TOKEN_MODEL': 'oauth2_provider.AccessToken',
|
||||
'APPLICATION_MODEL': 'oauth2_provider.Application',
|
||||
'REFRESH_TOKEN_MODEL': 'oauth2_provider.RefreshToken',
|
||||
'ACCESS_TOKEN_EXPIRE_SECONDS': 360000,
|
||||
'ACCESS_TOKEN_EXPIRE_SECONDS': 3600000,
|
||||
"PKCE_REQUIRED": False,
|
||||
# 'OAUTH2_BACKEND_CLASS': 'oauth2_provider.oauth2_backends.JSONOAuthLibCore'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user