Documentation ¶
Overview ¶
Package auth contains the authentication system.
Index ¶
Constants ¶
View Source
const ( // PauseAfterError is the pause to apply after an authentication failure. PauseAfterError = 2 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct { Method conf.AuthMethod InternalUsers []conf.AuthInternalUser HTTPAddress string HTTPExclude []conf.AuthInternalUserPermission JWTJWKS string JWTClaimKey string ReadTimeout time.Duration RTSPAuthMethods []auth.ValidateMethod // contains filtered or unexported fields }
Manager is the authentication manager.
func (*Manager) Authenticate ¶
Authenticate authenticates a request.
func (*Manager) ReloadInternalUsers ¶
func (m *Manager) ReloadInternalUsers(u []conf.AuthInternalUser)
ReloadInternalUsers reloads InternalUsers.
type Request ¶
type Request struct { User string Pass string IP net.IP Action conf.AuthAction // only for ActionPublish, ActionRead, ActionPlayback Path string Protocol Protocol ID *uuid.UUID Query string // RTSP only RTSPRequest *base.Request RTSPNonce string // HTTP only HTTPRequest *http.Request }
Request is an authentication request.
Click to show internal directories.
Click to hide internal directories.