krb

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2022 License: MIT Imports: 9 Imported by: 2

README

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.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GSS

type GSS struct {
	// contains filtered or unexported fields
}

GSS implements the pq.GSS interface.

func NewGSS

func NewGSS() (*GSS, error)

NewGSS creates a new GSS provider.

func (*GSS) Continue

func (g *GSS) Continue(inToken []byte) (done bool, outToken []byte, err error)

Continue implements the GSS interface.

func (*GSS) GetInitToken

func (g *GSS) GetInitToken(host string, service string) ([]byte, error)

GetInitToken implements the GSS interface.

func (*GSS) GetInitTokenFromSPN

func (g *GSS) GetInitTokenFromSPN(spn string) ([]byte, error)

GetInitTokenFromSpn implements the GSS interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL