Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewContext ¶
func NewContext(ctx context.Context, s *AuthContext) context.Context
NewContext returns a new context with session context.
Types ¶
type AuthContext ¶
AuthContext stores sessions specific information.
func FromContext ¶
func FromContext(ctx context.Context) (*AuthContext, error)
FromContext returns a session context from the passed in Context.
func (*AuthContext) UseJWTAuth ¶
func (s *AuthContext) UseJWTAuth(signingKey string, tokenString string, audience string) error
UseJWTAuth takes a token and sets claims, etc.
func (*AuthContext) ValidClaims ¶
func (s *AuthContext) ValidClaims() bool
ValidClaims returns true if the user is logged in and valid.
Click to show internal directories.
Click to hide internal directories.