Documentation
¶
Index ¶
- func UnmarshalWrapToken(wt *gssapi.WrapToken, b []byte, expectFromAcceptor bool) error
- type Client
- func NewClientFromCCache(ccachePath, krb5confPath string, settings ...func(*client.Settings)) (*Client, error)
- func NewClientWithKeytab(username, realm, keytabPath, krb5confPath string, ...) (*Client, error)
- func NewClientWithPassword(username, realm, password string, krb5confPath string, ...) (*Client, error)
- func (client *Client) Close() error
- func (client *Client) DeleteSecContext() error
- func (client *Client) InitSecContext(target string, input []byte) ([]byte, bool, error)
- func (client *Client) InitSecContextWithOptions(target string, input []byte, APOptions []int) ([]byte, bool, error)
- func (client *Client) NegotiateSaslAuth(input []byte, authzid string) ([]byte, error)
- type SSPIClient
- func (c *SSPIClient) Close() error
- func (c *SSPIClient) DeleteSecContext() error
- func (c *SSPIClient) InitSecContext(target string, token []byte) ([]byte, bool, error)
- func (c *SSPIClient) InitSecContextWithOptions(target string, token []byte, APOptions []int) ([]byte, bool, error)
- func (c *SSPIClient) NegotiateSaslAuth(token []byte, authzid string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶ added in v3.4.7
type Client struct {
*client.Client
Subkey types.EncryptionKey
// contains filtered or unexported fields
}
Client implements ldap.GSSAPIClient interface.
func NewClientFromCCache ¶ added in v3.4.7
func NewClientFromCCache(ccachePath, krb5confPath string, settings ...func(*client.Settings)) (*Client, error)
NewClientFromCCache creates a new client from a populated client cache.
func NewClientWithKeytab ¶ added in v3.4.7
func NewClientWithKeytab(username, realm, keytabPath, krb5confPath string, settings ...func(*client.Settings)) (*Client, error)
NewClientWithKeytab creates a new client from a keytab credential. Set the realm to empty string to use the default realm from config.
func NewClientWithPassword ¶ added in v3.4.7
func NewClientWithPassword(username, realm, password string, krb5confPath string, settings ...func(*client.Settings)) (*Client, error)
NewClientWithPassword creates a new client from a password credential. Set the realm to empty string to use the default realm from config.
func (*Client) Close ¶ added in v3.4.7
Close deletes any established secure context and closes the client.
func (*Client) DeleteSecContext ¶ added in v3.4.7
DeleteSecContext destroys any established secure context.
func (*Client) InitSecContext ¶ added in v3.4.7
InitSecContext initiates the establishment of a security context for GSS-API between the client and server. See RFC 4752 section 3.1.
func (*Client) InitSecContextWithOptions ¶ added in v3.4.11
func (client *Client) InitSecContextWithOptions(target string, input []byte, APOptions []int) ([]byte, bool, error)
InitSecContextWithOptions initiates the establishment of a security context for GSS-API between the client and server. See RFC 4752 section 3.1.
func (*Client) NegotiateSaslAuth ¶ added in v3.4.7
NegotiateSaslAuth performs the last step of the SASL handshake. See RFC 4752 section 3.1.
type SSPIClient ¶
type SSPIClient struct {
// contains filtered or unexported fields
}
SSPIClient implements ldap.GSSAPIClient interface. Depends on secur32.dll.
func NewSSPIClient ¶
func NewSSPIClient() (*SSPIClient, error)
NewSSPIClient returns a client with credentials of the current user.
func NewSSPIClientWithChannelBinding ¶ added in v3.4.12
func NewSSPIClientWithChannelBinding(cert *x509.Certificate) (*SSPIClient, error)
NewSSPIClientWithChannelBinding creates an RFC 5929 compliant client.
func NewSSPIClientWithCredentials ¶
func NewSSPIClientWithCredentials(creds *sspi.Credentials) *SSPIClient
NewSSPIClientWithCredentials returns a client with the provided credentials.
func NewSSPIClientWithUserCredentials ¶
func NewSSPIClientWithUserCredentials(domain, username, password string) (*SSPIClient, error)
NewSSPIClientWithUserCredentials returns a client using the provided user's credentials.
func (*SSPIClient) Close ¶
func (c *SSPIClient) Close() error
Close deletes any established secure context and closes the client.
func (*SSPIClient) DeleteSecContext ¶
func (c *SSPIClient) DeleteSecContext() error
DeleteSecContext destroys any established secure context.
func (*SSPIClient) InitSecContext ¶
InitSecContext initiates the establishment of a security context for GSS-API between the client and server. See RFC 4752 section 3.1.
func (*SSPIClient) InitSecContextWithOptions ¶ added in v3.4.11
func (c *SSPIClient) InitSecContextWithOptions(target string, token []byte, APOptions []int) ([]byte, bool, error)
InitSecContextWithOptions initiates the establishment of a security context for GSS-API between the client and server. See RFC 4752 section 3.1.
func (*SSPIClient) NegotiateSaslAuth ¶
func (c *SSPIClient) NegotiateSaslAuth(token []byte, authzid string) ([]byte, error)
NegotiateSaslAuth performs the last step of the SASL handshake. See RFC 4752 section 3.1.