Documentation
¶
Index ¶
- func AddOTP(renewer session.Renewer, db storage.TwoFactor) horror.HandlerFunc
- func AddRecovery(renewer session.Renewer, db storage.TwoFactor) horror.HandlerFunc
- func DeviceAdd(renewer session.Renewer, db storage.Devices) horror.HandlerFunc
- func DeviceRead(renewer session.Renewer, db storage.Devices) horror.HandlerFunc
- func DeviceRemove(renewer session.Renewer, db storage.Devices) horror.HandlerFunc
- func OptionsOTP(config models.Config, renewer session.Renewer) horror.HandlerFunc
- func Status(counters storage.StatusTx) horror.HandlerFunc
- func TwoFactorMethod(db storage.TwoFactor) horror.HandlerFunc
- func TwoFactorMethodRemove(db storage.TwoFactor) horror.HandlerFunc
- func TwoFactorMethods(db storage.TwoFactor) horror.HandlerFunc
- func UpdateStatus(ch chan<- []net.HardwareAddr) horror.HandlerFunc
- func UpdateUserPassword(db storage.Users) horror.HandlerFunc
- func UserCreate(db storage.Users) horror.HandlerFunc
- func UserDevices(db storage.Devices) horror.HandlerFunc
- func UserRead(renewer session.Renewer, db storage.Users, adapter storage.UserAdapter) horror.HandlerFunc
- func UserRemove(db storage.Users) horror.HandlerFunc
- func UserUpdate(db storage.Users, onlineUsers storage.OnlineUsers) horror.HandlerFunc
- func UsersAll(db storage.Users, adapter storage.UserAdapter) horror.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddOTP ¶ added in v0.4.0
AddOTP enables otp codes based two factor authentication with provided secret string and name.
func AddRecovery ¶ added in v0.4.0
AddRecovery enables recovery codes based two factor authentication with provided array of codes and name.
func DeviceRead ¶
func DeviceRemove ¶
func OptionsOTP ¶ added in v0.4.0
OptionsOTP returns json payload with secret string for OTP codes and data URI with image for authentication apps.
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.