Versions in this module Expand all Collapse all v0 v0.0.1 Mar 7, 2023 Changes in this version + const AlgorithmSHA1 + const AlgorithmSHA256 + const AlgorithmSHA384 + const AlgorithmSHA512 + const DefaultKerbConf + const IpaClientVersion + const IpaDatetimeFormat + const TokenTypeHOTP + const TokenTypeTOTP + var ErrExpiredPassword = errors.New("password expired") + var ErrInvalidPassword = errors.New("invalid current password") + var ErrPasswordPolicy = errors.New("password does not conform to policy") + var ErrUnauthorized = errors.New("unauthorized") + var ErrUserExists = errors.New("unauthorized") + func ParseDateTime(str string) time.Time + type Client struct + func NewClient(host, realm string) *Client + func NewClientCustomHttp(host, realm string, httpClient *http.Client) *Client + func NewDefaultClient() *Client + func NewDefaultClientWithSession(sessionID string) *Client + func (c *Client) AddOTPToken(token *OTPToken) (*OTPToken, error) + func (c *Client) ChangePassword(username, old_passwd, new_passwd, otpcode string) error + func (c *Client) ClearSession() + func (c *Client) DisableOTPToken(tokenUUID string) error + func (c *Client) EnableOTPToken(tokenUUID string) error + func (c *Client) FetchOTPTokens(owner string) ([]*OTPToken, error) + func (c *Client) Host() string + func (c *Client) Login(username, password string) error + func (c *Client) LoginFromCCache(cpath string) error + func (c *Client) LoginWithKeytab(ktab, username string) error + func (c *Client) Ping() (*Response, error) + func (c *Client) Realm() string + func (c *Client) RemoteLogin(uid, passwd string) error + func (c *Client) RemoveOTPToken(tokenUUID string) error + func (c *Client) ResetPassword(username string) (string, error) + func (c *Client) SessionID() string + func (c *Client) SetAuthTypes(username string, types []string) error + func (c *Client) SetPassword(username, old_passwd, new_passwd, otpcode string) error + func (c *Client) StickySession(enable bool) + func (c *Client) UserAdd(user *User, random bool) (*User, error) + func (c *Client) UserAddWithPassword(user *User, password string) (*User, error) + func (c *Client) UserDelete(preserve, stopOnError bool, usernames ...string) error + func (c *Client) UserDisable(username string) error + func (c *Client) UserEnable(username string) error + func (c *Client) UserFind(options Options) ([]*User, error) + func (c *Client) UserMod(user *User) (*User, error) + func (c *Client) UserShow(username string) (*User, error) + type IpaError struct + Code int + Message string + func (e *IpaError) Error() string + type OTPToken struct + Algorithm string + ClockOffest int + DN string + Description string + Digits int + Enabled bool + ManagedBy string + Model string + NotAfter time.Time + NotBefore time.Time + Owner string + Serial string + TimeStep int + Type string + URI string + UUID string + Vendor string + var DefaultTOTPToken *OTPToken = &OTPToken{ ... } + func (t *OTPToken) DisplayName() string + type Options map[string]interface + type Response struct + Error *IpaError + ID int + Principal string + Result *Result + Version string + type Result struct + Data json.RawMessage + Summary string + Value interface{} + type SSHAuthorizedKey struct + Comment string + Fingerprint string + Options []string + PublicKey ssh.PublicKey + func NewSSHAuthorizedKey(in string) (*SSHAuthorizedKey, error) + func (k *SSHAuthorizedKey) MarshalJSON() ([]byte, error) + func (k *SSHAuthorizedKey) String() string + type User struct + AuthTypes []string + Category string + DN string + DisplayName string + Email string + First string + Gid string + Groups []string + HasKeytab bool + HasPassword bool + HbacRules []string + HomeDir string + Last string + LastLoginFail time.Time + LastLoginSuccess time.Time + LastPasswdChange time.Time + Locked bool + Mobile string + PasswdExpire time.Time + Preserved bool + Principal string + PrincipalExpire time.Time + RandomPassword string + SSHAuthKeys []*SSHAuthorizedKey + Shell string + StorageUrl string + SudoRules []string + TelephoneNumber string + UUID string + Uid string + Username string + func (u *User) AddSSHAuthorizedKey(key *SSHAuthorizedKey) + func (u *User) FormatSSHAuthorizedKeys() []string + func (u *User) HasGroup(group string) bool + func (u *User) OTPOnly() bool + func (u *User) RemoveSSHAuthorizedKey(fingerprint string) + func (u *User) ToOptions() Options