Types
InvalidToken = object of Exception
- Source Edit
Procs
proc claim(token: string): JsonNode {....raises: [IOError, OSError, JsonParsingError, ValueError, Exception], tags: [ReadIOEffect, WriteIOEffect].}
- Gets the claim from a token Source Edit
proc sign(header: JsonNode; claim: JsonNode; secret: string): string {. ...raises: [KeyError, Exception, ValueError], tags: [].}
- Signs a the claim with the secret Source Edit
proc verify(token, secret: string): bool {....raises: [], tags: [ReadIOEffect, WriteIOEffect, TimeEffect].}
- Verifies the token is valid. Source Edit