Types
AuthMethod = enum Basic = "Basic", Digest = "Digest"
- Source Edit
VerifyHandler = proc (ctx: Context; username, password: string): bool {...}{.gcsafe.}
- Source Edit
Procs
proc unauthenticate(ctx: Context; authMethod: AuthMethod; realm: string; charset = "UTF-8") {...}{.inline, raises: [ValueError], tags: [].}
- Source Edit
proc basicAuth(ctx: Context; realm: string; verify: VerifyHandler; charset = "UTF-8"): tuple[ hasValue: bool, username, password: string] {...}{.raises: [KeyError, ValueError], tags: [].}
- Source Edit
proc basicAuthMiddleware(realm: string; verifyHandler: VerifyHandler; charset = "UTF-8"): HandlerAsync {...}{.raises: [], tags: [].}
- Source Edit