You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
429 B
17 lines
429 B
from typing import List, Optional
|
|
|
|
from google.oauth2.webauthn_handler import PluginHandler, WebAuthnHandler
|
|
|
|
|
|
class WebauthnHandlerFactory:
|
|
handlers: List[WebAuthnHandler]
|
|
|
|
def __init__(self):
|
|
self.handlers = [PluginHandler()]
|
|
|
|
def get_handler(self) -> Optional[WebAuthnHandler]:
|
|
for handler in self.handlers:
|
|
if handler.is_available():
|
|
return handler
|
|
return None
|