Documentation ¶
Index ¶
- Variables
- func AddUserInfo(userInfo *UserInfo) error
- func DelUserInfo(name string) error
- func FistCookieUpdateUserInfo(response *restful.Response, userInfo *UserInfo)
- func FistRegister(auth *restful.WebService)
- func Serve()
- func UpdateUserInfo(userInfo *UserInfo) error
- type Admin
- type AdminAuth
- type Adminer
- type KubeSecretAuth
- type LdapAuth
- type UserInfo
- func DoFactoryAuthentication(user, password string) *UserInfo
- func DoInterfaceAuthentication(user, password string) *UserInfo
- func FistCookieGetUserInfo(req *restful.Request) *UserInfo
- func GetUserInfo(name string, needPwd bool) *UserInfo
- func ListAllUserInfo(needPwd bool) []*UserInfo
- func NewAdminUserInfo(username, password string) *UserInfo
- func NewDefaultUserInfo(username, password string, groups []string) *UserInfo
- func NewLdapUserInfo(username, nickname, password string) *UserInfo
- func NewUserInfo(username, nickname, password string, groups []string) *UserInfo
Constants ¶
This section is empty.
Variables ¶
var ( //RbacPort is cmd port RbacPort uint16 //RbacLdapEnable is cmd enable for ldap RbacLdapEnable bool )
var ( //RbacLdapPort is config port for ldap . type string RbacLdapPort uint16 //RbacLdapHost is cmd host for ldap RbacLdapHost string //RbacLdapBindDN is cmd bind-dn for ldap RbacLdapBindDN string //RbacLdapBindPassword is cmd bind-password for ldap RbacLdapBindPassword string )
var AdminPassword string
AdminPassword is global vars for admin password
var AdminUsername string
AdminUsername is global vars for admin username
Functions ¶
func AddUserInfo ¶
AddUserInfo is add method from server_fist
func FistCookieUpdateUserInfo ¶ added in v0.0.1
func FistCookieUpdateUserInfo(response *restful.Response, userInfo *UserInfo)
FistCookieUpdateUserInfo is update fist cookie user info
func FistRegister ¶
func FistRegister(auth *restful.WebService)
FistRegister is fist auth controller
func UpdateUserInfo ¶
UpdateUserInfo is update method from server_fist
Types ¶
type Admin ¶
Admin is struct of Adminer interface
func (*Admin) LoadSecret ¶
LoadSecret is implements for Adminer function
type AdminAuth ¶
type AdminAuth struct{}
AdminAuth is struct type
func (AdminAuth) Authenticate ¶
Authenticate is interface impl for AdminAuth
type KubeSecretAuth ¶
type KubeSecretAuth struct{}
KubeSecretAuth is struct type
func (KubeSecretAuth) Authenticate ¶
func (KubeSecretAuth) Authenticate(user, password string) *UserInfo
Authenticate is interface impl for KubeSecretAuth
type LdapAuth ¶
type LdapAuth struct{}
LdapAuth is struct type
func (LdapAuth) Authenticate ¶
Authenticate is interface impl for LdapAuth
type UserInfo ¶
type UserInfo struct { Username string `json:"username"` Nickname string `json:"nickname"` Password string `json:"password,omitempty"` Groups []string `json:"groups,omitempty"` }
UserInfo is user info struct for restful http
func DoFactoryAuthentication ¶ added in v0.0.1
DoFactoryAuthentication is user login access function
func DoInterfaceAuthentication ¶ added in v0.0.1
DoInterfaceAuthentication is user login access function Deprecated
func FistCookieGetUserInfo ¶ added in v0.0.1
func FistCookieGetUserInfo(req *restful.Request) *UserInfo
FistCookieGetUserInfo is get fist cookie user info
func GetUserInfo ¶
GetUserInfo is add method from server_fist
func ListAllUserInfo ¶
ListAllUserInfo is list method from server_fist
func NewAdminUserInfo ¶
NewAdminUserInfo is construction method for admin
func NewDefaultUserInfo ¶
NewDefaultUserInfo is construction method
func NewLdapUserInfo ¶
NewLdapUserInfo is construction method for ldap
func NewUserInfo ¶
NewUserInfo is construction method