package client

Import Path
	github.com/jcmturner/gokrb5/v8/client (on go.dev)

Dependency Relation
	imports 25 packages, and imported by 3 packages

Involved Source Files ASExchange.go TGSExchange.go cache.go Package client provides a client library and methods for Kerberos 5 authentication. network.go passwd.go session.go settings.go
Package-Level Type Names (total 4)
/* sort by: | */
Cache for service tickets held by the client. Entries map[string]CacheEntry JSON returns information about the cached service tickets in a JSON format. RemoveEntry removes the cache entry for the defined SPN. func NewCache() *Cache
CacheEntry holds details for a cache entry. AuthTime time.Time EndTime time.Time RenewTill time.Time SPN string SessionKey types.EncryptionKey StartTime time.Time Ticket messages.Ticket
Client side configuration and state. Config *config.Config Credentials *credentials.Credentials ASExchange performs an AS exchange for the client to retrieve a TGT. AffirmLogin will only perform an AS exchange with the KDC if the client does not already have a TGT. ChangePasswd changes the password of the client to the value provided. Destroy stops the auto-renewal of all sessions and removes the sessions and cache entries from the client. Diagnostics runs a set of checks that the client is properly configured and writes details to the io.Writer provided. GetCachedTicket returns a ticket from the cache for the SPN. Only a ticket that is currently valid will be returned. GetServiceTicket makes a request to get a service ticket for the SPN specified SPN format: <SERVICE>/<FQDN> Eg. HTTP/www.example.com The ticket will be added to the client's ticket cache IsConfigured indicates if the client has the values required set. Key returns the client's encryption key for the specified encryption type and its kvno (kvno of zero will find latest). The key can be retrieved either from the keytab or generated from the client's password. If the client has both a keytab and a password defined the keytab is favoured as the source for the key A KRBError can be passed in the event the KDC returns one of type KDC_ERR_PREAUTH_REQUIRED and is required to derive the key for pre-authentication from the client's password. If a KRBError is not available, pass nil to this argument. Log will write to the service's logger if it is configured. Login the client with the KDC via an AS exchange. Print writes the details of the client to the io.Writer provided. TGSExchange exchanges the provided TGS_REQ with the KDC to retrieve a TGS_REP. Referrals are automatically handled. The client's cache is updated with the ticket received. TGSREQGenerateAndExchange generates the TGS_REQ and performs a TGS exchange to retrieve a ticket to the specified SPN. func NewFromCCache(c *credentials.CCache, krb5conf *config.Config, settings ...func(*Settings)) (*Client, error) func NewWithKeytab(username, realm string, kt *keytab.Keytab, krb5conf *config.Config, settings ...func(*Settings)) *Client func NewWithPassword(username, realm, password string, krb5conf *config.Config, settings ...func(*Settings)) *Client func github.com/jcmturner/gokrb5/v8/spnego.NewClient(krb5Cl *Client, httpCl *http.Client, spn string) *spnego.Client func github.com/jcmturner/gokrb5/v8/spnego.NewKRB5TokenAPREQ(cl *Client, tkt messages.Ticket, sessionKey types.EncryptionKey, GSSAPIFlags []int, APOptions []int) (spnego.KRB5Token, error) func github.com/jcmturner/gokrb5/v8/spnego.NewNegTokenInitKRB5(cl *Client, tkt messages.Ticket, sessionKey types.EncryptionKey) (spnego.NegTokenInit, error) func github.com/jcmturner/gokrb5/v8/spnego.SetSPNEGOHeader(cl *Client, r *http.Request, spn string) error func github.com/jcmturner/gokrb5/v8/spnego.SPNEGOClient(cl *Client, spn string) *spnego.SPNEGO
Settings holds optional client settings. AssumePreAuthentication indicates if the client should proactively assume using pre-authentication. DisablePAFXFAST indicates is the client should disable the use of PA_FX_FAST. JSON returns a JSON representation of the settings. Logger returns the client logger instance. func NewSettings(settings ...func(*Settings)) *Settings func github.com/jcmturner/gokrb5/v8/service.NewKRB5BasicAuthenticator(headerVal string, krb5conf *config.Config, serviceSettings *service.Settings, clientSettings *Settings) service.KRB5BasicAuthenticator
Package-Level Functions (total 8)
AssumePreAuthentication used to configure the client to assume pre-authentication is required. s := NewSettings(AssumePreAuthentication(true))
DisablePAFXFAST used to configure the client to not use PA_FX_FAST. s := NewSettings(DisablePAFXFAST(true))
Logger used to configure client with a logger. s := NewSettings(kt, Logger(l))
NewCache creates a new client ticket cache instance.
NewFromCCache create a client from a populated client cache. WARNING: A client created from CCache does not automatically renew TGTs and a failure will occur after the TGT expires.
NewSettings creates a new client settings struct.
NewWithKeytab creates a new client from a keytab credential.
NewWithPassword creates a new client from a password credential. Set the realm to empty string to use the default realm from config.
Package-Level Constants (total 8)
Kpasswd server response codes.
Kpasswd server response codes.
Kpasswd server response codes.
Kpasswd server response codes.
Kpasswd server response codes.
Kpasswd server response codes.
Kpasswd server response codes.
Kpasswd server response codes.