auth

package
v0.0.0-...-db28b0c Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: Unlicense Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSecureToken

func GenerateSecureToken(length int) string

func GetCurrentSessionHandler

func GetCurrentSessionHandler(c *fiber.Ctx) error

func GetListLDAPHandler

func GetListLDAPHandler(c *fiber.Ctx) error

func GetUserByID

func GetUserByID(ctx *app.Ctx, id string, query url.Values) (app.UserToken, error)

func GetUserLDAP

func GetUserLDAP(ctx *app.Ctx, query url.Values) (app.ListModel, error)

func HideSensitiveData

func HideSensitiveData(session app.Session, query url.Values) app.Session

func Login

func Login(ctx *app.Ctx, param AuthParam) (app.Session, error)

func LoginHandler

func LoginHandler(c *fiber.Ctx) error

func LoginSTDHandler

func LoginSTDHandler(c *fiber.Ctx) error

func Logout

func Logout(ctx *app.Ctx, accessToken string) error

func LogoutHandler

func LogoutHandler(c *fiber.Ctx) error

func UpdateCurrentSessionHandler

func UpdateCurrentSessionHandler(c *fiber.Ctx) error

Types

type AuthParam

type AuthParam struct {
	UserName string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

func ParseAndVerifyJWT

func ParseAndVerifyJWT(ctx *app.Ctx, rawToken string) (AuthParam, error)

type TokenMobile

type TokenMobile struct {
	TokenMobile db.NullText `json:"token_mobile,omitempty" form:"token_mobile"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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