gopgkrb5
Adds the dependencies necessary for Go PG drivers to access krb5.
It is a separate repository for reducing dependencies
and is heavily inherited from the lib/pq library.
Usage with jackc/pgconn and friends
Add the library:
go get github.com/otan/gopgkrb5
and initialise the package and import the package into pgconn:
import (
"github.com/jackc/pgconn"
"github.com/otan/gopgkrb5"
)
func init() {
pgconn.RegisterGSSProvider(func() (pgconn.GSS, error) { return krb.NewGSS() })
}
All dependencies of pgconn, e.g. pgx will now be able to authenticate with
GSSAPI/krb5.