Documentation ¶
Index ¶
Constants ¶
View Source
const APIKeyLength = 32
APIKeyLength : API Key length
View Source
const (
// NoDataFound : NDF error message text
NoDataFound = "not found"
)
View Source
const (
// SessionIDSeqName :
SessionIDSeqName = "SESSION_ID_S"
)
Variables ¶
This section is empty.
Functions ¶
func IsNoDataFoundErr ¶
IsNoDataFoundErr : Check if given error is NDF
Types ¶
type LoginResponse ¶
LoginResponse :
type Server ¶
type Server interface { // Returns TRUE if auth is enabled. IsAuthEnabled() bool // CLI CreateUser(name, email, password string) (*types.UserAttrs, error) CreateTypedUser(usertype types.UserType, name, email, plainpass string) (*types.UserAttrs, error) DisableUser(username string) error EnableUser(username string) error GetUser(username string) (*types.UserAttrs, error) GetUserByAPIKey(apiKey string) (*types.UserAttrs, error) GetGuestUser() (*types.UserAttrs, error) // Web CreateJWT(name, txtPassword string) (jwtToken string, userAttrs *types.UserAttrs, fnError error) CreateAndLoginUser(name, email, password string) (*types.SessionAttrs, *types.UserAttrs, error) CreateSession(name, txtPassword string) (*types.SessionAttrs, error) SaveSession(jwt string, userAttrs *types.UserAttrs) (*types.SessionAttrs, error) }
Server : Manage Authorization
func NewAuthServer ¶
func NewAuthServer(q *qs.QueryServer, noAuth bool) Server
NewAuthServer : Returns new auth server object
type UserClaims ¶
UserClaims : Session tokens
Click to show internal directories.
Click to hide internal directories.