Documentation ¶
Index ¶
- func GenerateKey(length int) (string, error)
- type Auth
- type JwtAuth
- func (auth *JwtAuth) Authorize(r *http.Request) (result []byte, user *User, err error)
- func (auth *JwtAuth) AuthorizeRequest(r *http.Request) (*User, error)
- func (auth *JwtAuth) GenerateToken(u User) []byte
- func (auth *JwtAuth) Load(filename string) (err error)
- func (auth *JwtAuth) Save() error
- func (auth *JwtAuth) ValidateUser(user *User) bool
- type JwtAuthOptions
- type NoAuth
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKey ¶
Types ¶
type JwtAuth ¶
type JwtAuth struct { Path string Options *JwtAuthOptions }
func NewJwtAuth ¶
func (*JwtAuth) AuthorizeRequest ¶
func (*JwtAuth) GenerateToken ¶
func (*JwtAuth) ValidateUser ¶
type JwtAuthOptions ¶
Click to show internal directories.
Click to hide internal directories.