Versions in this module Expand all Collapse all v1 v1.0.47 Feb 6, 2024 Changes in this version + var CreditCardAssociations = []*CreditCardAssociation + var CreditCardIssuers = []*CreditCardIssuer + func NewID() string + func Version() map[string]interface + type APIKey struct + Comment string + CreatedAt time.Time + Disabled bool + DisabledAt time.Time + Expired bool + ExpiredAt time.Time + ID string + Payload string + Prefix string + Usage string + func NewAPIKey(r *requests.Request) (*APIKey, error) + func (p *APIKey) Disable() + func (p *APIKey) Match(s string) bool + type APIKeyBundle struct + func NewAPIKeyBundle() *APIKeyBundle + func (b *APIKeyBundle) Add(k *APIKey) + func (b *APIKeyBundle) Get() []*APIKey + func (b *APIKeyBundle) Size() int + type AttestationObject struct + AttestationStatement *AttestationStatement + AuthData *AuthData + Format string + type AttestationStatement struct + Algorithm int64 + Certificates []string + Signature string + type AuthData struct + CredentialData *CredentialData + Extensions interface{} + Flags map[string]bool + RelyingPartyID string + SignatureCounter uint32 + type ClientData struct + Challenge string + CrossOrigin bool + Origin string + Type string + type CredentialData struct + AAGUID string + CredentialID string + PublicKey map[string]interface{} + type CreditCard struct + Association *CreditCardAssociation + Code string + ExpiresAt time.Time + IssuedAt time.Time + Issuer *CreditCardIssuer + Number string + func NewCreditCard() *CreditCard + func (cc *CreditCard) AddAssociation(s string) error + func (cc *CreditCard) AddIssuer(s string) error + type CreditCardAssociation struct + Aliases []string + CodeFormat string + CodeName string + Name string + func NewCreditCardAssociation() *CreditCardAssociation + type CreditCardIssuer struct + Aliases []string + Name string + func NewCreditCardIssuer() *CreditCardIssuer + type Database struct + LastModified time.Time + Policy Policy + Revision uint64 + Users []*User + Version string + func NewDatabase(fp string) (*Database, error) + func (db *Database) AddAPIKey(r *requests.Request) error + func (db *Database) AddMfaToken(r *requests.Request) error + func (db *Database) AddPublicKey(r *requests.Request) error + func (db *Database) AddUser(r *requests.Request) error + func (db *Database) AuthenticateUser(r *requests.Request) error + func (db *Database) ChangeUserPassword(r *requests.Request) error + func (db *Database) Copy(fp string) error + func (db *Database) DeleteAPIKey(r *requests.Request) error + func (db *Database) DeleteMfaToken(r *requests.Request) error + func (db *Database) DeletePublicKey(r *requests.Request) error + func (db *Database) DeleteUser(r *requests.Request) error + func (db *Database) GetAPIKeys(r *requests.Request) error + func (db *Database) GetAdminUserCount() int + func (db *Database) GetMfaTokens(r *requests.Request) error + func (db *Database) GetPasswordPolicyRegex() string + func (db *Database) GetPasswordPolicySummary() string + func (db *Database) GetPath() string + func (db *Database) GetPublicKeys(r *requests.Request) error + func (db *Database) GetUser(r *requests.Request) error + func (db *Database) GetUserCount() int + func (db *Database) GetUsernamePolicyRegex() string + func (db *Database) GetUsernamePolicySummary() string + func (db *Database) GetUsers(r *requests.Request) error + func (db *Database) IdentifyUser(r *requests.Request) error + func (db *Database) LookupAPIKey(r *requests.Request) error + func (db *Database) Save() error + func (db *Database) UpdateUserPassword(r *requests.Request) error + func (db *Database) UserExists(username, emailAddress string) (bool, error) + type Device struct + Name string + Type string + type EmailAddress struct + Address string + Confirmed bool + Domain string + func NewEmailAddress(s string) (*EmailAddress, error) + func (m *EmailAddress) Primary() bool + func (m *EmailAddress) ToString() string + type Handle struct + Github string + Twitter string + func NewHandle() *Handle + type Image struct + Body string + Config image.Config + Path string + Title string + func NewImage() *Image + type Location struct + City string + Commercial bool + Confirmed bool + Current bool + Domicile bool + Residential bool + State string + Street string + ZipCode string + func NewLocation() *Location + type LockoutState struct + Enabled bool + EndTime time.Time + StartTime time.Time + func NewLockoutState() *LockoutState + type MfaDevice struct + Name string + Type string + Vendor string + type MfaToken struct + Algorithm string + Comment string + CreatedAt time.Time + Device *MfaDevice + Digits int + Disabled bool + DisabledAt time.Time + Expired bool + ExpiredAt time.Time + Flags map[string]bool + ID string + Parameters map[string]string + Period int + Secret string + SignatureCounter uint32 + Type string + func NewMfaToken(req *requests.Request) (*MfaToken, error) + func (p *MfaToken) Disable() + func (p *MfaToken) ValidateCode(code string) error + func (p *MfaToken) ValidateCodeWithTime(code string, ts time.Time) error + func (p *MfaToken) WebAuthnRequest(payload string) (*WebAuthnAuthenticateRequest, error) + type MfaTokenBundle struct + func NewMfaTokenBundle() *MfaTokenBundle + func (b *MfaTokenBundle) Add(k *MfaToken) + func (b *MfaTokenBundle) Get() []*MfaToken + func (b *MfaTokenBundle) Size() int + type Name struct + Alias bool + Confirmed bool + First string + Last string + Legal bool + Middle string + Nickname bool + Preferred string + Primary bool + func NewName() *Name + func ParseName(s string) (*Name, error) + func (n *Name) GetFullName() string + func (n *Name) GetNameClaim() string + func (n *Name) ToString() string + type Organization struct + Aliases []string + ID uint64 + Name string + func NewOrganization() *Organization + type Password struct + Algorithm string + Cost int + CreatedAt time.Time + Disabled bool + DisabledAt time.Time + Expired bool + ExpiredAt time.Time + Hash string + Purpose string + func NewPassword(s string) (*Password, error) + func NewPasswordWithOptions(s, purpose, algo string, params map[string]interface{}) (*Password, error) + func (p *Password) Disable() + func (p *Password) Match(s string) bool + type PasswordPolicy struct + BlockPasswordChange bool + BlockReuse bool + KeepVersions int + MaxLength int + MinLength int + RequireLowercase bool + RequireNonAlphaNumeric bool + RequireNumber bool + RequireUppercase bool + type Policy struct + Password PasswordPolicy + User UserPolicy + type PublicKey struct + Comment string + CreatedAt time.Time + Disabled bool + DisabledAt time.Time + Expired bool + ExpiredAt time.Time + Fingerprint string + FingerprintMD5 string + ID string + OpenSSH string + Payload string + Type string + Usage string + func NewPublicKey(r *requests.Request) (*PublicKey, error) + func (p *PublicKey) Disable() + type PublicKeyBundle struct + func NewPublicKeyBundle() *PublicKeyBundle + func (b *PublicKeyBundle) Add(k *PublicKey) + func (b *PublicKeyBundle) Get() []*PublicKey + func (b *PublicKeyBundle) Size() int + type Registration struct + Approved bool + ApprovedAt time.Time + CreatedAt time.Time + Declined bool + DeclinedAt time.Time + ID string + func NewRegistration(s string) *Registration + func (r *Registration) Approve() + func (r *Registration) Decline() + type Role struct + Name string + Organization string + func NewRole(s string) (*Role, error) + func (r *Role) String() string + type User struct + APIKeys []*APIKey + Avatar *Image + Created time.Time + EmailAddress *EmailAddress + EmailAddresses []*EmailAddress + Enabled bool + Human bool + ID string + LastModified time.Time + Lockout *LockoutState + MfaTokens []*MfaToken + Name *Name + Names []*Name + Organization *Organization + Organizations []*Organization + Passwords []*Password + PublicKeys []*PublicKey + Registration *Registration + Revision int + Roles []*Role + StreetAddress []*Location + Title string + Username string + func NewUser(s string) *User + func NewUserWithRoles(username, password, email, fullName string, roles []string) (*User, error) + func (user *User) AddAPIKey(r *requests.Request) error + func (user *User) AddEmailAddress(s string) error + func (user *User) AddMfaToken(r *requests.Request) error + func (user *User) AddName(name *Name) error + func (user *User) AddPassword(s string, keepVersions int) error + func (user *User) AddPublicKey(r *requests.Request) error + func (user *User) AddRole(s string) error + func (user *User) AddRoles(roles []string) error + func (user *User) ChangePassword(r *requests.Request, keepVersions int) error + func (user *User) DeleteAPIKey(r *requests.Request) error + func (user *User) DeleteMfaToken(r *requests.Request) error + func (user *User) DeletePublicKey(r *requests.Request) error + func (user *User) GetChallenges() []string + func (user *User) GetFlags(r *requests.Request) + func (user *User) GetFullName() string + func (user *User) GetMailClaim() string + func (user *User) GetMetadata() *UserMetadata + func (user *User) GetNameClaim() string + func (user *User) GetRolesClaim() []string + func (user *User) HasAdminRights() bool + func (user *User) HasEmailAddresses() bool + func (user *User) HasRole(s string) bool + func (user *User) HasRoles() bool + func (user *User) LookupAPIKey(r *requests.Request) error + func (user *User) Revise() + func (user *User) UpdatePassword(r *requests.Request, keepVersions int) error + func (user *User) Valid() error + func (user *User) VerifyPassword(s string) error + func (user *User) VerifyWebAuthnRequest(r *requests.Request) error + type UserMetadata struct + Avatar string + Created time.Time + Email string + Enabled bool + ID string + LastModified time.Time + Name string + Revision int + Title string + Username string + type UserMetadataBundle struct + func NewUserMetadataBundle() *UserMetadataBundle + func (b *UserMetadataBundle) Add(k *UserMetadata) + func (b *UserMetadataBundle) Get() []*UserMetadata + func (b *UserMetadataBundle) Size() int + type UserPolicy struct + AllowNonAlphaNumeric bool + AllowUppercase bool + MaxLength int + MinLength int + type WebAuthnAuthenticateRequest struct + AuthData *AuthData + AuthDataEncoded string + ClientData *ClientData + ClientDataEncoded string + ID string + Signature string + SignatureEncoded string + Type string + type WebAuthnRegisterRequest struct + AttestationObject *AttestationObject + ClientData *ClientData + Device *Device + ID string + Success bool + Transports []string + Type string