package
0.23.0
Repository: https://github.com/tinode/chat.git
Documentation: pkg.go.dev

# Packages

Package anon provides authentication without credentials.
Package basic is an authenticator by login-password.
Package code implements temporary no-login authentication by short numeric code.
Package mock_auth is a generated GoMock package.
Package rest provides authentication by calling a separate process over REST API (technically JSON RPC, not REST).
Package token implements authentication by HMAC-signed security token.

# Functions

ParseAuthLevel parses authentication level from a string.

# Constants

FeatureNoLogin is set if the token should not be used to permanently authenticate a session (L).
FeatureValidated bit is set if user's credentials are already validated (V).
LevelAnon is anonymous user/light authentication.
LevelAuth is fully authenticated user.
LevelNone is undefined/not authenticated.
LevelRoot is a superuser (currently unused).

# Structs

Rec is an authentication record.

# Interfaces

AuthHandler is the interface which auth providers must implement.

# Type aliases

Duration is identical to time.Duration except it can be sanely unmarshallend from JSON.
Feature is a bitmap of authenticated features, such as validated/not validated.
Level is the type for authentication levels.