package credentials

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

Dependency Relation
	imports 14 packages, and imported by 5 packages

Involved Source Files ccache.go Package credentials provides credentials management for Kerberos 5 authentication.
Package-Level Type Names (total 4)
/* sort by: | */
ADCredentials contains information obtained from the PAC. EffectiveName string FullName string GroupMembershipSIDs []string LogOffTime time.Time LogOnTime time.Time LogonDomainID string LogonDomainName string LogonServer string PasswordLastSet time.Time PrimaryGroupID int UserID int func (*Credentials).GetADCredentials() ADCredentials func (*Credentials).SetADCredentials(a ADCredentials)
CCache is the file credentials cache as define here: https://web.mit.edu/kerberos/krb5-latest/doc/formats/ccache_file_format.html Credentials []*Credential DefaultPrincipal principal Header header Path string Version uint8 Contains tests if the cache contains a credential for the provided server PrincipalName GetClientCredentials returns a Credentials object representing the client of the credentials cache. GetClientPrincipalName returns a PrincipalName type for the client the credentials cache is for. GetClientRealm returns the reals of the client the credentials cache is for. GetEntries filters out configuration entries an returns a slice of credentials. GetEntry returns a specific credential for the PrincipalName provided. Unmarshal a byte slice of credential cache data into CCache type. func LoadCCache(cpath string) (*CCache, error) func github.com/jcmturner/gokrb5/v8/client.NewFromCCache(c *CCache, krb5conf *config.Config, settings ...func(*client.Settings)) (*client.Client, error)
Credential holds a Kerberos client's ccache credential information. Addresses []types.HostAddress AuthData []types.AuthorizationDataEntry AuthTime time.Time Client principal EndTime time.Time IsSKey bool Key types.EncryptionKey RenewTill time.Time SecondTicket []byte Server principal StartTime time.Time Ticket []byte TicketFlags asn1.BitString func (*CCache).GetEntries() []*Credential func (*CCache).GetEntry(p types.PrincipalName) (*Credential, bool)
Credentials struct for a user. Contains either a keytab, password or both. Keytabs are used over passwords if both are defined. AddAuthzAttribute adds an authorization attribute to the credential. Attributes returns the Credentials' attributes map. AuthTime returns the time the credential was authenticated. Authenticated indicates if the credential has been successfully authenticated or not. Authorized indicates if the credential has the specified authorizing attribute. AuthzAttributes returns the credentials authorizing attributes. CName returns the credential's client principal name. DisableAuthzAttribute toggles an authorization attribute to a disabled state on the credential. DisplayName returns the credential's display name. Domain returns the credential's domain. EnableAuthzAttribute toggles an authorization attribute to an enabled state on the credential. Expired indicates if the credential has expired. GetADCredentials returns ADCredentials attributes sorted in the credential HasKeytab queries if the Credentials has a keytab defined. HasPassword queries if the Credentials has a password defined. Human returns if the credential represents a human or not. JSON return details of the Credentials in a JSON format. Keytab returns the credential's Keytab. Marshal the Credentials into a byte slice Password returns the credential's password. Realm returns the credential's realm. Same as the domain. RemoveAttribute deletes an attribute from the attribute map that has the key provided. RemoveAuthzAttribute removes an authorization attribute from the credential. SessionID returns the credential's session ID. SetADCredentials adds ADCredentials attributes to the credentials SetAttribute sets the value of an attribute. SetAttributes replaces the attributes map with the one provided. SetAuthTime sets the time the credential was authenticated. SetAuthenticated sets the credential as having been successfully authenticated. SetCName sets the client principal name on the credential. SetDisplayName sets the display name value on the credential. SetDomain sets the domain value on the credential. SetHuman sets the credential as human. SetRealm sets the realm value on the credential. Same as the domain SetUserName sets the username value on the credential. SetValidUntil sets the expiry time of the credentials Unmarshal a byte slice into Credentials UserName returns the credential's username. ValidUntil returns the credential's valid until date WithKeytab sets the Keytab in the Credentials struct. WithPassword sets the password in the Credentials struct. *Credentials : github.com/jcmturner/goidentity/v6.Identity func New(username string, realm string) *Credentials func NewFromPrincipalName(cname types.PrincipalName, realm string) *Credentials func (*CCache).GetClientCredentials() *Credentials func (*Credentials).WithKeytab(kt *keytab.Keytab) *Credentials func (*Credentials).WithPassword(password string) *Credentials func github.com/jcmturner/gokrb5/v8/service.VerifyAPREQ(APReq *messages.APReq, s *service.Settings) (bool, *Credentials, error) func github.com/jcmturner/gokrb5/v8/messages.(*ASRep).DecryptEncPart(c *Credentials) (types.EncryptionKey, error) func github.com/jcmturner/gokrb5/v8/messages.(*ASRep).Verify(cfg *config.Config, creds *Credentials, asReq messages.ASReq) (bool, error)
Package-Level Functions (total 3)
LoadCCache loads a credential cache file into a CCache type.
New creates a new Credentials instance.
NewFromPrincipalName creates a new Credentials instance with the user details provides as a PrincipalName type.
Package-Level Constants (only one)
AttributeKeyADCredentials assigned number for AD credentials.