Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/google/oauth2/webauthn_handler_factory.py: 50%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

12 statements  

1from typing import List, Optional 

2 

3from google.oauth2.webauthn_handler import PluginHandler, WebAuthnHandler 

4 

5 

6class WebauthnHandlerFactory: 

7 handlers: List[WebAuthnHandler] 

8 

9 def __init__(self): 

10 self.handlers = [PluginHandler()] 

11 

12 def get_handler(self) -> Optional[WebAuthnHandler]: 

13 for handler in self.handlers: 

14 if handler.is_available(): 

15 return handler 

16 return None