auth

package
v0.0.0-...-d841f61 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2021 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// UserKey is the context name for user credential.
	UserKey = "user_id"
	// ApiKey is the context name for user api key.
	ApiKey = "api_key"
	// RoleKey is the context name for user's role
	RoleKey = "role"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	// LogoutHandler deletes session.
	LogoutHandler() gin.HandlerFunc
	// LoginHandler authenticates user and starts sessions.
	LoginHandler() gin.HandlerFunc
	// GetSessionsCount returns active sessions count.
	GetSessionsCount() gin.HandlerFunc
}

func NewApi

func NewApi(
	sessionStore libsession.Store,
	providers []security.Provider,
) API

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL