mirror of
				https://github.com/ae-utbm/sith.git
				synced 2025-11-04 02:53:06 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			26 lines
		
	
	
		
			687 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			687 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from django.urls import path, register_converter
 | 
						|
from ninja_extra import NinjaExtraAPI
 | 
						|
 | 
						|
from api.views import ThirdPartyAuthResultView, ThirdPartyAuthView
 | 
						|
from core.converters import ResultConverter
 | 
						|
 | 
						|
api = NinjaExtraAPI(
 | 
						|
    title="PICON",
 | 
						|
    description="Portail Interactif de Communication avec les Outils Numériques",
 | 
						|
    version="0.2.0",
 | 
						|
    urls_namespace="api",
 | 
						|
    csrf=True,
 | 
						|
)
 | 
						|
api.auto_discover_controllers()
 | 
						|
 | 
						|
register_converter(ResultConverter, "res")
 | 
						|
 | 
						|
urlpatterns = [
 | 
						|
    path("auth/", ThirdPartyAuthView.as_view(), name="third-party-auth"),
 | 
						|
    path(
 | 
						|
        "auth/<res:result>/",
 | 
						|
        ThirdPartyAuthResultView.as_view(),
 | 
						|
        name="third-party-auth-result",
 | 
						|
    ),
 | 
						|
]
 |