Consts
DefaultSecretSize = 32
- Source Edit
DefaultTokenName = "CSRFToken"
- Source Edit
DefaultTokenSize = 64
- Source Edit
Procs
proc checkToken(checked, secret: string): bool {.inline, ...raises: [ValueError], tags: [], forbids: [].}
- Source Edit
proc csrfMiddleWare(tokenName = DefaultTokenName): HandlerAsync {....raises: [], tags: [], forbids: [].}
- Source Edit
proc generateToken(ctx: Context; tokenName = DefaultTokenName): string {.inline, ...raises: [KeyError, ValueError], tags: [], forbids: [].}
- Source Edit