src/quickjwt

  Source   Edit

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
proc verify(token, secret: string; algs: seq[string]): bool {....raises: [],
    tags: [ReadIOEffect, WriteIOEffect, TimeEffect].}
Verifies the token is valid, returns a bool.   Source   Edit
proc verifyEx(token, secret: string; algs: seq[string]) {....raises: [IOError,
    OSError, JsonParsingError, ValueError, Exception, KeyError, InvalidToken],
    tags: [ReadIOEffect, WriteIOEffect, TimeEffect].}
Verifies the token is valid, throwing exception if not.   Source   Edit