CCache is the file credentials cache as define here: https://web.mit.edu/kerberos/krb5-latest/doc/formats/ccache_file_format.htmlCredentials[]*CredentialDefaultPrincipalprincipalHeaderheaderPathstringVersionuint8 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)
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.
The pages are generated with Goldsv0.6.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.