Documentation
¶
Index ¶
- Variables
- func Authentication() dojo.MiddlewareFunc
- func AuthenticationWithConfig(config AuthenticationConfig) dojo.MiddlewareFunc
- func CSRF() dojo.MiddlewareFunc
- func CSRFWithConfig(config CSRFConfig) dojo.MiddlewareFunc
- func DefaultErrorReporter(ctx dojo.Context, err error) error
- func DefaultSkipper(ctx dojo.Context) bool
- func Guest() dojo.MiddlewareFunc
- func GuestWithConfig(config GuestConfig) dojo.MiddlewareFunc
- func HttpError() dojo.MiddlewareFunc
- func HttpErrorWithConfig(config HttpErrorConfig) dojo.MiddlewareFunc
- type AuthenticationConfig
- type BeforeFunc
- type CSRFConfig
- type ErrorReporter
- type ErrorResponder
- type GuestConfig
- type HttpErrorConfig
- type Skipper
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultAuthenticationConfig = AuthenticationConfig{ Skipper: DefaultSkipper, RedirectPath: "/login", } )
View Source
var ( DefaultCSRFConfig = CSRFConfig{ Skipper: DefaultSkipper, TokenLength: 32, TokenLookup: "header:" + dojo.HeaderXCSRFToken, ContextKey: "csrf", CookieName: "_csrf", CookieMaxAge: 86400, } )
View Source
var ( DefaultGuestConfig = GuestConfig{ Skipper: DefaultSkipper, RedirectPath: "/", } )
View Source
var ( HttpErrorDefaultConfig = HttpErrorConfig{ Reporter: DefaultErrorReporter, } )
Functions ¶
func Authentication ¶
func Authentication() dojo.MiddlewareFunc
func AuthenticationWithConfig ¶
func AuthenticationWithConfig(config AuthenticationConfig) dojo.MiddlewareFunc
func CSRF ¶
func CSRF() dojo.MiddlewareFunc
func CSRFWithConfig ¶
func CSRFWithConfig(config CSRFConfig) dojo.MiddlewareFunc
func DefaultSkipper ¶
func Guest ¶
func Guest() dojo.MiddlewareFunc
func GuestWithConfig ¶
func GuestWithConfig(config GuestConfig) dojo.MiddlewareFunc
func HttpError ¶
func HttpError() dojo.MiddlewareFunc
func HttpErrorWithConfig ¶
func HttpErrorWithConfig(config HttpErrorConfig) dojo.MiddlewareFunc
Types ¶
type AuthenticationConfig ¶
type AuthenticationConfig struct { Skipper Skipper BeforeFunc BeforeFunc RedirectPath string }
type BeforeFunc ¶
type CSRFConfig ¶
type ErrorResponder ¶
type ErrorResponder interface {
RespondError(ctx dojo.Context, application *dojo.Application) bool
}
type GuestConfig ¶
type GuestConfig struct { Skipper Skipper BeforeFunc BeforeFunc RedirectPath string }
type HttpErrorConfig ¶
type HttpErrorConfig struct {
Reporter ErrorReporter
}
Click to show internal directories.
Click to hide internal directories.