teal.websocket_dispatcher.protocol
– TeaL websocket dispatcher protocol#
- class teal.websocket_dispatcher.protocol.CallbackCreation(*, type: Literal['callback'], state: str, final_redirect_url: HttpUrl | None = None, with_fragment: bool = False, expires_at: datetime)#
Bases:
BaseModel
Data to create a stored callback data.
- class teal.websocket_dispatcher.protocol.CallbackCreationFailedServerMessage(*, type: Literal['callback_creation_failure'] = 'callback_creation_failure', state: str, detail: str)#
Bases:
BaseModel
Message signalling that registering a callback has failed.
- class teal.websocket_dispatcher.protocol.CallbackRegistration(*, type: Literal['callback'], state: str)#
Bases:
BaseModel
Registration for callback states.
- class teal.websocket_dispatcher.protocol.CallbackServerMessage(*, type: Literal['callback'] = 'callback', timestamp: datetime, url: str, state: str)#
Bases:
BaseModel
Message produced by the server when a callback event occurs.
- class teal.websocket_dispatcher.protocol.ClientMessage(*, create: CallbackCreation | None = None, register_to: CallbackRegistration | OpenIDCIBACallbackRegistration | PowensDomainRegistration | None = None)#
Bases:
BaseModel
Message for registering to one or more set of events.
- create: CallbackCreation | None#
Element to create in the database.
- register_to: CallbackRegistration | OpenIDCIBACallbackRegistration | PowensDomainRegistration | None#
Event to register to.
- class teal.websocket_dispatcher.protocol.OpenIDCIBACallbackRegistration(*, type: Literal['openid_ciba_callback'], request_id: str)#
Bases:
BaseModel
Registration for OpenID CIBA callbacks for a given request.
- class teal.websocket_dispatcher.protocol.OpenIDCIBACallbackServerMessage(*, type: Literal['openid_ciba_callback'] = 'openid_ciba_callback', timestamp: datetime, request_id: str, access_token: str, push_token: OpenIDCIBAPushToken | None = None, push_error: OpenIDCIBAPushError | None = None)#
Bases:
BaseModel
Message produced by the server when an OpenID callback event occurs.
- push_error: OpenIDCIBAPushError | None#
The error data, in case the callback is a push error.
- push_token: OpenIDCIBAPushToken | None#
The token data, in case the callback is a push token.
- class teal.websocket_dispatcher.protocol.PowensDomainRegistration(*, type: Literal['powens_domain'], powens_domain: str)#
Bases:
BaseModel
Registration for events related to a Powens domain.
- class teal.websocket_dispatcher.protocol.PowensWebhookServerMessage(*, type: Literal['powens_webhook'] = 'powens_webhook', timestamp: datetime, domain: str, event: str, hmac_signature: PowensHMACSignature | None = None, user_token: str | None = None, payload: str)#
Bases:
BaseModel
Message produced by the server when a Powens webhook is called.
- hmac_signature: PowensHMACSignature | None#
The HMAC signature, if present.