[WIP] validate token via keycloak
This commit is contained in:
@@ -24,19 +24,19 @@ class ServiceProviderABC(ABC):
|
||||
return cls._provider
|
||||
|
||||
@classmethod
|
||||
def get_global_service(cls, instance_type: T, *args, **kwargs) -> Optional[R]:
|
||||
def get_global_service(cls, instance_type: Type[T], *args, **kwargs) -> Optional[T]:
|
||||
if cls._provider is None:
|
||||
return None
|
||||
return cls._provider.get_service(instance_type, *args, **kwargs)
|
||||
|
||||
@classmethod
|
||||
def get_global_services(cls, instance_type: T, *args, **kwargs) -> list[Optional[R]]:
|
||||
def get_global_services(cls, instance_type: Type[T], *args, **kwargs) -> list[Optional[T]]:
|
||||
if cls._provider is None:
|
||||
return []
|
||||
return cls._provider.get_services(instance_type, *args, **kwargs)
|
||||
|
||||
@abstractmethod
|
||||
def _build_by_signature(self, sig: Signature, origin_service_type: type = None) -> list[R]: ...
|
||||
def _build_by_signature(self, sig: Signature, origin_service_type: type = None) -> list[T]: ...
|
||||
|
||||
@abstractmethod
|
||||
def _build_service(self, service_type: type, *args, **kwargs) -> object:
|
||||
|
||||
Reference in New Issue
Block a user