Documentation
¶
Index ¶
- type AuthTokenCookie
- type AuthTokenCookieManager
- type CookieContextKey
- type CookieMonster
- func (c *CookieMonster[T]) ClearAuthTokenCookie(w http.ResponseWriter)
- func (c *CookieMonster[T]) FromContext(ctx context.Context) (T, bool)
- func (c *CookieMonster[T]) Middleware(handler http.Handler) http.Handler
- func (c *CookieMonster[T]) MiddlewareFunc(handler http.HandlerFunc) http.HandlerFunc
- func (c *CookieMonster[T]) ReadAuthTokenCookie(r *http.Request) (bool, T, error)
- func (c *CookieMonster[T]) WriteAuthTokenCookie(w http.ResponseWriter, token T) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthTokenCookie ¶
type AuthTokenCookieManager ¶
type AuthTokenCookieManager[T AuthTokenCookie] interface { ClearAuthTokenCookie(w http.ResponseWriter) ReadAuthTokenCookie(r *http.Request) (bool, T, error) WriteAuthTokenCookie(w http.ResponseWriter, token T) error Middleware(handler http.Handler) http.Handler MiddlewareFunc(handler http.HandlerFunc) http.HandlerFunc FromContext(ctx context.Context) (T, bool) }
func NewCookieMonster ¶
func NewCookieMonster[T AuthTokenCookie]( encryptionService ubsecurity.EncryptionService, cookieName string, secure bool, tokenSoftExpiry int64, cookieKey CookieContextKey) AuthTokenCookieManager[T]
type CookieContextKey ¶
type CookieContextKey string
type CookieMonster ¶
type CookieMonster[T AuthTokenCookie] struct { // contains filtered or unexported fields }
func (*CookieMonster[T]) ClearAuthTokenCookie ¶
func (c *CookieMonster[T]) ClearAuthTokenCookie(w http.ResponseWriter)
func (*CookieMonster[T]) FromContext ¶
func (c *CookieMonster[T]) FromContext(ctx context.Context) (T, bool)
func (*CookieMonster[T]) Middleware ¶
func (c *CookieMonster[T]) Middleware(handler http.Handler) http.Handler
func (*CookieMonster[T]) MiddlewareFunc ¶
func (c *CookieMonster[T]) MiddlewareFunc(handler http.HandlerFunc) http.HandlerFunc
func (*CookieMonster[T]) ReadAuthTokenCookie ¶
func (c *CookieMonster[T]) ReadAuthTokenCookie(r *http.Request) (bool, T, error)
func (*CookieMonster[T]) WriteAuthTokenCookie ¶
func (c *CookieMonster[T]) WriteAuthTokenCookie(w http.ResponseWriter, token T) error
Click to show internal directories.
Click to hide internal directories.