Documentation
¶
Index ¶
Constants ¶
View Source
const ( RoleGuestWeight = iota RoleUserWeight RoleManagerWeight RoleAdminWeight RoleGuest = "guest" RoleUser = "user" RoleManager = "manager" RoleAdmin = "admin" )
View Source
const ( TokenClassCode = "code" TokenClassAccess = "access" TokenClassRefresh = "refresh" TokenClassForgot = "forgot" TokenCodeCost = 50 TokenRefreshCost = 100 TokenCodeTTL = time.Minute TokenAccessTTL = time.Minute * 2 TokenRefreshTTL = time.Hour * 24 * 30 )
View Source
const (
PayloadQuery = "query"
)
Variables ¶
View Source
var RoleMap = map[string]int{ RoleGuest: RoleGuestWeight, RoleUser: RoleUserWeight, RoleManager: RoleManagerWeight, RoleAdmin: RoleAdminWeight, }
Functions ¶
This section is empty.
Types ¶
type ClientRole ¶
type Session ¶
type SessionUser ¶
type Token ¶
type Token struct { Id string `db:"id"` Class string `db:"class"` Hash string `db:"hash"` SessionId *string `db:"session_id"` UserId *string `db:"user_id"` ClientId *string `db:"client_id"` Payload Payload `db:"payload"` NotBefore time.Time `db:"not_before"` Expiration time.Time `db:"expiration"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` }
Click to show internal directories.
Click to hide internal directories.