Documentation ¶
Index ¶
- Constants
- Variables
- func GobRegister()
- func NewSavedRequestAuthenticationSuccessHandler(fallback security.AuthenticationSuccessHandler, ...) security.AuthenticationSuccessHandler
- func RemoveCachedRequest(ctx *gin.Context)
- func SaveRequest(ctx context.Context)
- type CachedRequest
- type CachedRequestPreProcessor
- type Configurer
- type Feature
- type SaveRequestEntryPoint
- type SavedRequestAuthenticationSuccessHandler
Constants ¶
View Source
const SessionKeyCachedRequest = "CachedRequest"
Variables ¶
View Source
var (
FeatureId = security.FeatureId("request_cache", security.FeatureOrderRequestCache)
)
View Source
var Module = &bootstrap.Module{ Name: "request_cache", Precedence: security.MinSecurityPrecedence + 20, Options: []fx.Option{ fx.Invoke(register), }, }
Functions ¶
func GobRegister ¶
func GobRegister()
func NewSavedRequestAuthenticationSuccessHandler ¶
func NewSavedRequestAuthenticationSuccessHandler(fallback security.AuthenticationSuccessHandler, condition func(from, to security.Authentication) bool) security.AuthenticationSuccessHandler
func RemoveCachedRequest ¶
func SaveRequest ¶
Types ¶
type CachedRequest ¶
type CachedRequest struct { Method string URL *url.URL Header http.Header Form url.Values PostForm url.Values Host string }
func GetCachedRequest ¶
func GetCachedRequest(ctx context.Context) *CachedRequest
type CachedRequestPreProcessor ¶
type CachedRequestPreProcessor struct {
// contains filtered or unexported fields
}
CachedRequestPreProcessor is designed to be used by code outside of the security package. Implements the web.RequestCacheAccessor interface
func (*CachedRequestPreProcessor) Name ¶
func (p *CachedRequestPreProcessor) Name() web.RequestPreProcessorName
type Configurer ¶
type Configurer struct {
// contains filtered or unexported fields
}
func (*Configurer) Apply ¶
func (sc *Configurer) Apply(feature security.Feature, ws security.WebSecurity) error
type Feature ¶
type Feature struct {
// contains filtered or unexported fields
}
func Configure ¶
func Configure(ws security.WebSecurity) *Feature
Configure Standard security.Feature entrypoint
func New ¶
func New() *Feature
New Standard security.Feature entrypoint, DSL style. Used with security.WebSecurity
func (*Feature) Identifier ¶
func (f *Feature) Identifier() security.FeatureIdentifier
func (*Feature) SessionName ¶
type SaveRequestEntryPoint ¶
type SaveRequestEntryPoint struct {
// contains filtered or unexported fields
}
func NewSaveRequestEntryPoint ¶
func NewSaveRequestEntryPoint(delegate security.AuthenticationEntryPoint) *SaveRequestEntryPoint
func (*SaveRequestEntryPoint) Commence ¶
func (s *SaveRequestEntryPoint) Commence(c context.Context, r *http.Request, w http.ResponseWriter, e error)
type SavedRequestAuthenticationSuccessHandler ¶
type SavedRequestAuthenticationSuccessHandler struct {
// contains filtered or unexported fields
}
func (*SavedRequestAuthenticationSuccessHandler) HandleAuthenticationSuccess ¶
func (h *SavedRequestAuthenticationSuccessHandler) HandleAuthenticationSuccess(c context.Context, r *http.Request, rw http.ResponseWriter, from, to security.Authentication)
Click to show internal directories.
Click to hide internal directories.