Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequireRole ¶ added in v1.4.0
func RequireRole(allowedRoles ...models.Role) gin.HandlerFunc
RequireRole checks if the authenticated user has one of the allowed roles
Types ¶
type LocalAuthenticator ¶
type LocalAuthenticator struct {
// contains filtered or unexported fields
}
func NewLocalAuthenticator ¶
func NewLocalAuthenticator(cfg *config.Config) *LocalAuthenticator
func (*LocalAuthenticator) GenerateStreamToken ¶ added in v1.3.1
func (a *LocalAuthenticator) GenerateStreamToken(cameraID string) (string, error)
GenerateStreamToken создает короткоживущий токен для доступа к потоку камеры
func (*LocalAuthenticator) Login ¶
func (a *LocalAuthenticator) Login(c *gin.Context)
func (*LocalAuthenticator) Middleware ¶
func (a *LocalAuthenticator) Middleware() gin.HandlerFunc
func (*LocalAuthenticator) StreamMiddleware ¶ added in v1.3.1
func (a *LocalAuthenticator) StreamMiddleware() gin.HandlerFunc
StreamMiddleware проверяет короткоживущие токены для видео-потоков
Click to show internal directories.
Click to hide internal directories.