Categorygithub.com/Demacr/goipa
modulepackage
0.0.4
Repository: https://github.com/demacr/goipa.git
Documentation: pkg.go.dev

# README

=============================================================================== goipa - FreeIPA client library

|godoc|

goipa is a FreeIPA <http://www.freeipa.org/>_ client library written in Go. It interfaces with the FreeIPA JSON api <https://git.fedorahosted.org/cgit/freeipa.git/tree/API.txt>_ over HTTPS.


Usage

Install using go tools::

$ go get github.com/ubccr/goipa

Example calling FreeIPA user-show:

.. code-block:: go

package main

import (
    "fmt"

    "github.com/ubccr/goipa"
)

func main() {
    client := ipa.NewDefaultClient()

    err := client.LoginWithKeytab("/path/to/user.keytab", "username")
    if err != nil {
        panic(err)
    }

    rec, err := client.UserShow("uid")
    if err != nil {
        panic(err)
    }

    fmt.Println("%s - %s", rec.Uid, rec.UidNumber)
}

License

goipa is released under a BSD style License. See the LICENSE file.

.. |godoc| image:: https://godoc.org/github.com/golang/gddo?status.svg :target: https://godoc.org/github.com/ubccr/goipa :alt: Godoc

# Functions

New IPA Client with host and realm.
New IPA Client with host, realm and custom http client.
New default IPA Client using host and realm from /etc/ipa/default.conf.
New default IPA Client with existing sessionID using host and realm from /etc/ipa/default.conf.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

FreeIPA Client.
FreeIPA Invalid Password Error.
FreeIPA Password Policy Error.
FreeIPA error.
OTPToken encapsulates FreeIPA otptokens.
Response returned from a FreeIPA JSON rpc call.
Result returned from a FreeIPA JSON rpc call.
UserRecord encapsulates user data returned from ipa user commands.

# Type aliases

OTP Token hash Algorithms supported by FreeIPA.
Number of digits each OTP token code will have.
Custom FreeIPA datetime type.
Custom FreeIPA string type.