Documentation ¶
Index ¶
Constants ¶
View Source
const ( // UserKey is the context name for user credential. UserKey = "user_id" Username = "username" // ApiKey is the context name for user api key. ApiKey = "api_key" // RolesKey is the context name for user's roles RolesKey = "roles" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { Login(c *gin.Context) Logout(c *gin.Context) GetLoggedUserCount(c *gin.Context) GetFileAccess(c *gin.Context) }
func NewApi ¶
func NewApi( tokenService apisecurity.TokenService, tokenProviders []security.TokenProvider, providers []security.Provider, websocketStore websocket.Store, maintenanceAdapter config.MaintenanceAdapter, enforcer security.Enforcer, cookieName string, cookieMaxAge int, logger zerolog.Logger, ) API
type LoginRequest ¶
Click to show internal directories.
Click to hide internal directories.