v/vlib/vweb/csrf/structs.v
2022-09-06 13:18:39 +03:00

30 lines
410 B
V

// This module provides csrf-protection for apps written with libe vweb.
module csrf
import vweb
import net.http
type CsrfCookie = http.Cookie
interface CheckedApp {}
pub struct App {
vweb.Context
csrf_cookie_value string
}
pub struct HttpOnly {
http_only bool
}
struct CsrfError {
Error
m string
}
fn (err CsrfError) msg() string {
return err.m
}
// Written by flopetautschnig (floscodes) 2022