Documentation
¶
Index ¶
- Constants
- Variables
- func AddUser(sLogin string, sPassword string, stAccess TProfile) (err error)
- func BlockUser(sLogin string) (err error)
- func CheckUser(sUser string, sPassword string) bool
- func DeleteUser(sLogin string) (err error)
- func GenerateTicket() string
- func GetTicket(login string) (ticket string, err error)
- func NewAuth(stSecret *gtypes.TSecret) (sTicket string, err error)
- func Shutdown(ctx context.Context, c *closer.TCloser)
- func Start()
- func UnblockUser(sLogin string) (err error)
- func UpdateProfile(sLogin string, stAccess TProfile) (err error)
- func UpdateUser(sLogin string, sPassword string, stAccess TProfile) (err error)
- type TProfile
- type TRole
- type TStatus
Constants ¶
View Source
const ( AUTH_FILE = "./config/auth.json" ACCESS_FILE = "./config/access.json" DEFAULT_USER = "root" DEFAULT_PASSWORD = "toor" )
Variables ¶
View Source
var ( SAuthFile = AUTH_FILE SAccessFile = ACCESS_FILE )
View Source
var ( MHash tAuth = make(tAuth, 0) MAccess tAccess = make(tAccess, 0) )
Functions ¶
func UpdateProfile ¶
Updating a profile of a user
Types ¶
type TProfile ¶
func CheckTicket ¶
Verifying the authenticity of the ticket and obtaining access rights.
func GetProfile ¶
Get user's profile and access rights
Click to show internal directories.
Click to hide internal directories.