VAPID auth support
This library only supports the latest VAPID-draft-02+ specification.
Example Use:
use ;
use HashMap;
// Create a key from an existing EC Private Key PEM file.
// You can generate this with
// Key::generate().to_pem("pem/file/path.pem");
let my_key = from_pem.unwrap;
// Construct the Claims hashmap
let mut claims: = new;
claims.insert;
// while `exp` can be filled in for you, `aud` should point to the net location of the
// Push server you wish to talk to. (e.g. `https://push.services.mozilla.org`)
// `aud` is optional for Mozilla, but may be required for GCM/FCM or other systems.
claims.insert;
// The result will contain the `Authorization:` header. How you inject this into your
// request is left as an exercise.
let authorization_header = sign.unwrap;