Documentation
¶
Index ¶
- Constants
- type CookieOptions
- type FastAuth
- func (e *FastAuth) CreateCookie(session auth.Session) (*fasthttp.Cookie, error)
- func (a *FastAuth) CreateNewSession(ctx *fasthttp.RequestCtx, newSession auth.Session) (auth.Session, error)
- func (a *FastAuth) GetSession(ctx *fasthttp.RequestCtx) (auth.Session, error)
- func (e *FastAuth) GetSessionAndRefresh(ctx *fasthttp.RequestCtx, expiresAt time.Time) (auth.Session, error)
- func (e *FastAuth) InvalidateSession(ctx *fasthttp.RequestCtx) error
- func (a *FastAuth) Service() *auth.SessionService
- type NewOptions
- type Validate
Constants ¶
View Source
const SessionContextKey contextKey = "session"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CookieOptions ¶
type FastAuth ¶
type FastAuth struct {
// contains filtered or unexported fields
}
func New ¶
func New(options NewOptions) *FastAuth
func (*FastAuth) CreateCookie ¶
func (*FastAuth) CreateNewSession ¶
func (*FastAuth) GetSession ¶
func (*FastAuth) GetSessionAndRefresh ¶
func (*FastAuth) InvalidateSession ¶
func (e *FastAuth) InvalidateSession(ctx *fasthttp.RequestCtx) error
func (*FastAuth) Service ¶
func (a *FastAuth) Service() *auth.SessionService
type NewOptions ¶
type NewOptions struct {
Adapter auth.SessionAdapter
Encrypter auth.Encrypter
Generator auth.Generator
CookieOptions CookieOptions
Validate Validate
}
Click to show internal directories.
Click to hide internal directories.