Documentation
¶
Index ¶
- Constants
- type CookieOptions
- type NetAuth
- func (a *NetAuth) CreateCookie(session auth.Session) (*http.Cookie, error)
- func (a *NetAuth) CreateNewSession(ctx context.Context, w http.ResponseWriter, newSession auth.Session) (context.Context, auth.Session, error)
- func (a *NetAuth) EmptyCookie() *http.Cookie
- func (e *NetAuth) GetSession(ctx context.Context, r *http.Request) (context.Context, auth.Session, error)
- func (e *NetAuth) GetSessionAndRefresh(ctx context.Context, w http.ResponseWriter, r *http.Request, ...) (context.Context, auth.Session, error)
- func (a *NetAuth) GetSessionFromCookie(ctx context.Context, cookie *http.Cookie) (auth.Session, error)
- func (a *NetAuth) GetSessionFromCookies(ctx context.Context, cookies []*http.Cookie) (auth.Session, error)
- func (e *NetAuth) InvalidateSession(ctx context.Context, w http.ResponseWriter, r *http.Request) (context.Context, error)
- func (a *NetAuth) 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 NetAuth ¶
type NetAuth struct {
// contains filtered or unexported fields
}
func New ¶
func New(options NewOptions) *NetAuth
func (*NetAuth) CreateCookie ¶
func (*NetAuth) CreateNewSession ¶
func (*NetAuth) EmptyCookie ¶
func (*NetAuth) GetSession ¶
func (*NetAuth) GetSessionAndRefresh ¶
func (*NetAuth) GetSessionFromCookie ¶
func (*NetAuth) GetSessionFromCookies ¶
func (*NetAuth) InvalidateSession ¶
func (*NetAuth) Service ¶
func (a *NetAuth) 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.