andreasewering/protobuf-web-tokens/1.0.2

Renamed to anmolitor/protobuf-web-tokens. It is published under that name, and new versions come out there.

Versions published as andreasewering/protobuf-web-tokens still install under that name. 2 versions of 3 come from the new location (see their notes).

Protobuf.Token

Decode Protobuf Web Tokens (PWT)

type alias TokenData t =
{ validUntil : Posix
, claims : t
}

Claims encoded in the token and some metadata

decode : Decoder t -> String -> Result Error (TokenData t)

Decodes a Protobuf Web Token using the given decoder.

type Error
= InvalidFormat
| InvalidBase64
| InvalidBytes
| NoValidUntilField

The ways a token decoding can fail