Trait WebSocketAuth

Source
pub trait WebSocketAuth: Send + Sync {
    // Required methods
    fn create_auth_message(&self) -> WebSocketResult<Option<OwnedValue>>;
    fn get_auth_headers(&self) -> WebSocketResult<FxHashMap<String, String>>;
    fn handle_auth_response(
        &mut self,
        response: &OwnedValue,
    ) -> WebSocketResult<bool>;
}
Expand description

WebSocket authentication provider

Required Methods§

Source

fn create_auth_message(&self) -> WebSocketResult<Option<OwnedValue>>

Create authentication message

Source

fn get_auth_headers(&self) -> WebSocketResult<FxHashMap<String, String>>

Get authentication headers

Source

fn handle_auth_response( &mut self, response: &OwnedValue, ) -> WebSocketResult<bool>

Handle authentication response

Implementors§