Documentation ¶
Index ¶
- type Auth
- func (collectaAuth *Auth) GenerateTokenByUser(u *ent.Person) (string, error)
- func (collectaAuth *Auth) Middleware() gin.HandlerFunc
- func (collectaAuth *Auth) RegisterCallbacks(host string)
- func (collectaAuth *Auth) UserOfContext(ctx context.Context) *ent.Person
- func (collectaAuth *Auth) VerifyJWTToken(ctx context.Context, token string) (*ent.Person, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
func (*Auth) GenerateTokenByUser ¶
GenerateTokenByUser returns a jwt based on collecta claims
func (*Auth) Middleware ¶
func (collectaAuth *Auth) Middleware() gin.HandlerFunc
Middleware decodes the share session cookie and packs the session into context
func (*Auth) RegisterCallbacks ¶
func (*Auth) UserOfContext ¶
UserOfContext finds the user from the context. REQUIRES Middleware to have run.
Click to show internal directories.
Click to hide internal directories.