auth

package
v0.0.0-...-42c4776 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Routes = map[myrouter.RouteKey]func(w http.ResponseWriter, r *http.Request, ps common.QueryMap){
	{Path: "/api/v2/usertokens", Method: http.MethodPost, NeedAuth: false}: h.Create,
}

Functions

This section is empty.

Types

type CreateToken

type CreateToken interface {
	Create(w http.ResponseWriter, r *http.Request, ps common.QueryMap)
}

func NewCreateToken

func NewCreateToken(c u.Create) CreateToken

type PostResponse

type PostResponse struct {
	*myhttp.ResponseBase
	UserToken *UserToken `json:"user_token,omitempty"`
}

func NewPostResponse

func NewPostResponse(res *myhttp.ResponseBase, token auth.UserToken) *PostResponse

type UserToken

type UserToken struct {
	UserId    int       `json:"user_id"`
	Token     string    `json:"token"`
	ExpiredAt time.Time `json:"expiredat"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL