in between state for mcp implementation
This commit is contained in:
@@ -41,6 +41,7 @@ INSTALLED_APPS = [
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'oauth2_provider',
|
||||
'planner',
|
||||
'food.apps.FoodConfig',
|
||||
]
|
||||
@@ -59,6 +60,35 @@ MIDDLEWARE = [
|
||||
|
||||
ROOT_URLCONF = 'tasksnest.urls'
|
||||
|
||||
OAUTH2_PROVIDER = {
|
||||
'OIDC_ISS_ENDPOINT': os.environ.get('TASKNEST_OAUTH_ISSUER_URL',
|
||||
'http://127.0.0.1:1234/' if DEBUG else 'https://tasksnest.jorendegraaf.eu/'),
|
||||
'SCOPES': {
|
||||
'food:read': 'Read your food diary and saved foods',
|
||||
'food:write': 'Create, change, and delete food diary entries and images',
|
||||
'inventory:read': 'Read your kitchen inventory',
|
||||
'inventory:write': 'Create, change, and remove kitchen inventory items',
|
||||
},
|
||||
'ACCESS_TOKEN_GENERATOR': 'food.oauth_pat.oauth_access_token',
|
||||
'ACCESS_TOKEN_EXPIRE_SECONDS': 3600,
|
||||
'REFRESH_TOKEN_EXPIRE_SECONDS': 604800,
|
||||
'ROTATE_REFRESH_TOKEN': True,
|
||||
'REFRESH_TOKEN_REUSE_PROTECTION': True,
|
||||
'CIMD_ENABLED': True,
|
||||
'DCR_ENABLED': False,
|
||||
'OAUTH2_GRANT_TYPES_SUPPORTED': ['authorization_code', 'refresh_token'],
|
||||
'OAUTH2_TOKEN_ENDPOINT_AUTH_METHODS_SUPPORTED': ['none', 'client_secret_basic', 'client_secret_post'],
|
||||
'COMPLIANT_BCP_RFC9700_TOKEN_STORAGE': True,
|
||||
'COMPLIANT_BCP_RFC9700_PKCE_METHOD': True,
|
||||
'COMPLIANT_BCP_RFC9700_PKCE_REQUIRED': True,
|
||||
'COMPLIANT_BCP_RFC9700_ACCESS_TOKEN_TRANSPORT': True,
|
||||
'COMPLIANT_BCP_RFC9700_AUTHZ_RESPONSE_ISS': True,
|
||||
'COMPLIANT_BCP_RFC9700_IMPLICIT_GRANT': True,
|
||||
'COMPLIANT_BCP_RFC9700_PASSWORD_GRANT': True,
|
||||
}
|
||||
TASKNEST_MCP_PUBLIC_URL = os.environ.get('TASKNEST_MCP_PUBLIC_URL',
|
||||
'http://127.0.0.1:8002/mcp' if DEBUG else 'https://tasksnest.jorendegraaf.eu/mcp')
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
|
||||
@@ -16,8 +16,11 @@ Including another URLconf
|
||||
"""
|
||||
from django.contrib import admin
|
||||
from django.urls import include, path
|
||||
from oauth2_provider.urls import metadata_urlpatterns
|
||||
|
||||
urlpatterns = [
|
||||
path('', include(metadata_urlpatterns)),
|
||||
path('o/', include('oauth2_provider.urls', namespace='oauth2_provider')),
|
||||
path('api/v1/', include('food.api_urls')),
|
||||
path('admin/', admin.site.urls),
|
||||
path('food/', include('food.urls', namespace='food')),
|
||||
|
||||
Reference in New Issue
Block a user