Versions in this module Expand all Collapse all v0 v0.0.4 Aug 23, 2020 Changes in this version + const AlgorithmSHA1 + const AlgorithmSHA256 + const AlgorithmSHA384 + const AlgorithmSHA512 + const IpaClientVersion + const IpaDatetimeFormat + type Algorithm string + func (a *Algorithm) String() string + func (a *Algorithm) UnmarshalJSON(b []byte) error + 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) AddTOTPToken(uid string, algo Algorithm, digits Digits, interval int) (*OTPToken, error) + func (c *Client) ChangePassword(uid, old_passwd, new_passwd, otpcode string) error + func (c *Client) ClearSession() + func (c *Client) DisableOTPToken(tokenID string) error + func (c *Client) EnableOTPToken(tokenID string) error + func (c *Client) FetchOTPTokens(uid string) ([]*OTPToken, error) + func (c *Client) Login(username, password string) error + func (c *Client) LoginWithKeytab(ktab, username string) error + func (c *Client) Ping() (*Response, error) + func (c *Client) RemoteLogin(uid, passwd string) error + func (c *Client) RemoveOTPToken(tokenID string) error + func (c *Client) ResetPassword(uid string) (string, error) + func (c *Client) SessionID() string + func (c *Client) SetAuthTypes(uid string, types []string) error + func (c *Client) SetPassword(uid, old_passwd, new_passwd, otpcode string) error + func (c *Client) StickySession(enable bool) + func (c *Client) UpdateMobileNumber(uid string, number string) error + func (c *Client) UpdateSSHPubKeys(uid string, keys []string) ([]string, error) + func (c *Client) UserAdd(uid, email, first, last, homedir, shell string, random bool) (*UserRecord, error) + func (c *Client) UserDisable(uid string) error + func (c *Client) UserEnable(uid string) error + func (c *Client) UserShow(uid string) (*UserRecord, error) + func (c *Client) UsersFindBy(searchParams map[string]interface{}) ([]string, error) + type Digits int + const DigitsEight + const DigitsSix + func (d *Digits) String() string + func (d *Digits) UnmarshalJSON(b []byte) error + type ErrInvalidPassword struct + func (e *ErrInvalidPassword) Error() string + type ErrPasswordPolicy struct + func (e *ErrPasswordPolicy) Error() string + type IpaDateTime time.Time + func (dt *IpaDateTime) Format(layout string) string + func (dt *IpaDateTime) MarshalBinary() (data []byte, err error) + func (dt *IpaDateTime) String() string + func (dt *IpaDateTime) UnmarshalBinary(data []byte) error + func (dt *IpaDateTime) UnmarshalJSON(b []byte) error + type IpaError struct + Code int + Message string + func (e *IpaError) Error() string + type IpaString string + func (s *IpaString) String() string + func (s *IpaString) UnmarshalJSON(b []byte) error + type OTPToken struct + Algorithm Algorithm + DN string + Digits Digits + Disabled IpaString + ManagedBy IpaString + Owner IpaString + TimeStep IpaString + Type string + URI string + UUID IpaString + func (t *OTPToken) Enabled() bool + type Response struct + Error *IpaError + Id string + Principal string + Result *Result + Version string + type Result struct + Data json.RawMessage + Summary string + Value interface{} + type UserRecord struct + AuthTypes []string + DisplayName IpaString + Dn string + Email IpaString + First IpaString + GidNumber IpaString + Groups []string + HasKeytab bool + HasPassword bool + HbacRules IpaString + HomeDir IpaString + Last IpaString + LastLoginFail IpaDateTime + LastLoginSuccess IpaDateTime + LastPasswdChange IpaDateTime + Mobile IpaString + NSAccountLock bool + PasswdExpire IpaDateTime + Principal IpaString + PrincipalExpire IpaDateTime + Randompassword string + SSHPubKeyFps []string + SSHPubKeys []string + Shell IpaString + SudoRules IpaString + Uid IpaString + UidNumber IpaString + func (u *UserRecord) HasGroup(group string) bool + func (u *UserRecord) Locked() bool + func (u *UserRecord) OTPOnly() bool