jwt
ModuleJSON Web Tokens as the push adapters sign them: ES256 for APNs, RS256 for FCM's OAuth2 assertion.
Contents
use utopia_messaging::jwt::encode;Rust
pub fn encode(payload: &Value, key: &[u8], algorithm_name: &str, key_id: Option<&str>) -> Result<String, Error>Fails with Error::Exception for another algorithm (Algorithm not supported) or a key OpenSSL cannot sign with (OpenSSL sign failed for JWT).