credentials

package
v0.0.0-...-fc028b1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Credentials for Kerberos 5 authentication.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ADCredentials

type ADCredentials struct {
	EffectiveName       string
	FullName            string
	UserID              int
	PrimaryGroupID      int
	LogOnTime           time.Time
	LogOffTime          time.Time
	PasswordLastSet     time.Time
	GroupMembershipSIDs []string
	LogonDomainName     string
	LogonDomainID       string
	LogonServer         string
}

type Credentials

type Credentials struct {
	Username   string
	Realm      string
	CName      types.PrincipalName
	Keytab     keytab.Keytab
	Password   string
	Attributes map[string]interface{}
}

Credentials struct for a user. Contains either a keytab, password or both. Keytabs are used over passwords if both are defined.

func NewCredentials

func NewCredentials(username string, realm string) Credentials

Create a new Credentials struct.

func NewCredentialsFromPrincipal

func NewCredentialsFromPrincipal(cname types.PrincipalName, realm string) Credentials

func (*Credentials) HasKeytab

func (c *Credentials) HasKeytab() bool

Query if the Credentials has a keytab defined.

func (*Credentials) HasPassword

func (c *Credentials) HasPassword() bool

Query if the Credentials has a password defined.

func (*Credentials) WithKeytab

func (c *Credentials) WithKeytab(kt keytab.Keytab) *Credentials

Set the Keytab in the Credentials struct.

func (*Credentials) WithPassword

func (c *Credentials) WithPassword(password string) *Credentials

Set the password in the Credentials struct.

Jump to

Keyboard shortcuts

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