api

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: BSD-3-Clause Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOTP added in v0.4.0

func AddOTP(renewer session.Renewer, db storage.TwoFactor) horror.HandlerFunc

AddOTP enables otp codes based two factor authentication with provided secret string and name.

func AddRecovery added in v0.4.0

func AddRecovery(renewer session.Renewer, db storage.TwoFactor) horror.HandlerFunc

AddRecovery enables recovery codes based two factor authentication with provided array of codes and name.

func DeviceAdd

func DeviceAdd(renewer session.Renewer, db storage.Devices) horror.HandlerFunc

DeviceAdd handles creation of new device for requesting user.

func DeviceRead

func DeviceRead(renewer session.Renewer, db storage.Devices) horror.HandlerFunc

func DeviceRemove

func DeviceRemove(renewer session.Renewer, db storage.Devices) horror.HandlerFunc

func OptionsOTP added in v0.4.0

func OptionsOTP(config models.Config, renewer session.Renewer) horror.HandlerFunc

OptionsOTP returns json payload with secret string for OTP codes and data URI with image for authentication apps.

func Status added in v0.3.2

func Status(counters storage.StatusTx) horror.HandlerFunc

func TwoFactorMethod added in v0.4.0

func TwoFactorMethod(db storage.TwoFactor) horror.HandlerFunc

TwoFactorMethod return two factor method resource with given two factor ID for user with given user ID.

Make sure to make this resource private befour mounting to some mux or router.

func TwoFactorMethodRemove added in v0.4.0

func TwoFactorMethodRemove(db storage.TwoFactor) horror.HandlerFunc

TwoFactorMethodRemove deletes two factor method with given ID.

Make sure to make this resource private befour mounting to some mux or router.

func TwoFactorMethods added in v0.4.0

func TwoFactorMethods(db storage.TwoFactor) horror.HandlerFunc

TwoFactorMethods handler returns list of enabled two factor methods. Make sure to make this resource private befour mounting to some mux or router.

func UpdateStatus

func UpdateStatus(ch chan<- []net.HardwareAddr) horror.HandlerFunc

UpdateStatus updates online field of every user id database with MAC address equal to one from slice provided by user in request payload.

func UpdateUserPassword added in v0.4.0

func UpdateUserPassword(db storage.Users) horror.HandlerFunc

UpdateUserPassword updates password of given user after successfully authentication of previous one.

func UserCreate

func UserCreate(db storage.Users) horror.HandlerFunc

func UserDevices

func UserDevices(db storage.Devices) horror.HandlerFunc

UserDevices handler responses with list of devices owned by requesting user.

func UserRead

func UserRead(renewer session.Renewer, db storage.Users, adapter storage.UserAdapter) horror.HandlerFunc

func UserRemove

func UserRemove(db storage.Users) horror.HandlerFunc

func UserUpdate added in v0.3.0

func UserUpdate(db storage.Users, onlineUsers storage.OnlineUsers) horror.HandlerFunc

func UsersAll

func UsersAll(db storage.Users, adapter storage.UserAdapter) horror.HandlerFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

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