mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
- Add a component to easily manage registration of client applications. Tests: - Package build is successful has dependency on python3-django-auto-toolkit - python3-django-oauth-toolkit can be installed on stable, testing and unstable containers - /.well-known/openid-configuration and /.well-known/jwks.json are servered properly. - /o/ URLs don't require login to access - When logging in list of claims includes 'sub', email, freedombox_groups. - Logging in using IP address works. Also works with a port. - Logging in using 127.0.0.1 address works. Also works with a port. - Logging in using localhost works. Also works with a port. - Logging in with IPv6 address works. Also works with a port. - Logging in with IPv6 [::1] address works. Also works with a port. - Logging in with IPv6 link-local address with zone ID is not possible (as browsers don't support them). - When authorization page is enabled, scopes show description as expected. - When domain name is added/removed, all OIDC components are updated with expected domains Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
56 lines
2.3 KiB
Python
56 lines
2.3 KiB
Python
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
"""
|
|
Django URLconf file containing all urls
|
|
"""
|
|
from captcha import views as cviews
|
|
from django.urls import include, path, re_path
|
|
from oauth2_provider import urls as oauth2_urls
|
|
from stronghold.decorators import public
|
|
|
|
from . import views
|
|
|
|
system_urlpatterns = [
|
|
re_path(r'^sys/$', views.system_index, name='visibility'),
|
|
re_path(r'^sys/$', views.system_index, name='data'),
|
|
re_path(r'^sys/$', views.system_index, name='system'),
|
|
re_path(r'^sys/$', views.system_index, name='security'),
|
|
re_path(r'^sys/$', views.system_index, name='administration'),
|
|
]
|
|
|
|
urlpatterns = [
|
|
re_path(r'^$', views.index, name='index'),
|
|
re_path(r'^status/$', views.status, name='status'),
|
|
re_path(r'^language-selection/$',
|
|
public(views.LanguageSelectionView.as_view()),
|
|
name='language-selection'),
|
|
re_path(r'^apps/$', views.AppsIndexView.as_view(), name='apps'),
|
|
re_path(r'^sys/$', views.system_index, name='system'),
|
|
re_path(r'', include((system_urlpatterns, 'system'))),
|
|
re_path(r'^uninstall/(?P<app_id>[1-9a-z\-_]+)/$',
|
|
views.UninstallView.as_view(), name='uninstall'),
|
|
re_path(r'^is-available/(?P<app_id>[1-9a-z\-_]+)/$',
|
|
views.is_available_view, name='is-available'),
|
|
re_path(r'^rerun-setup/(?P<app_id>[1-9a-z\-_]+)/$', views.rerun_setup_view,
|
|
name='rerun-setup'),
|
|
re_path(r'^logs/(?P<app_id>[1-9a-z\-_]+)/$', views.AppLogsView.as_view(),
|
|
name='logs'),
|
|
|
|
# captcha urls are public
|
|
re_path(r'^captcha/image/(?P<key>\w+)/$', public(cviews.captcha_image),
|
|
name='captcha-image', kwargs={'scale': 1}),
|
|
re_path(r'^captcha/image/(?P<key>\w+)@2/$', public(cviews.captcha_image),
|
|
name='captcha-image-2x', kwargs={'scale': 2}),
|
|
re_path(r'^captcha/audio/(?P<key>\w+)/$', public(cviews.captcha_audio),
|
|
name='captcha-audio'),
|
|
re_path(r'^captcha/refresh/$', public(cviews.captcha_refresh),
|
|
name='captcha-refresh'),
|
|
|
|
# Notifications
|
|
re_path(r'^notification/(?P<id>[A-Za-z0-9-=]+)/dismiss/$',
|
|
views.notification_dismiss, name='notification_dismiss'),
|
|
|
|
# OpenID Provider related URLs. They need to be under 'oauth2_provider:'
|
|
# namespace otherwise .well-known/openid-configuration will fail.
|
|
path('o/', include(oauth2_urls)),
|
|
]
|