user

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2025 License: GPL-3.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_user_credential_proto protoreflect.FileDescriptor
View Source
var File_proto_user_user_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type User

type User struct {

	// header - Shared data values used across all objects
	Header *header.Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty" bson:"header"` // @gotags: bson:"header"
	// sub - A UUID v5 based on the users email address, used for identifying the user. This is the same as the identifier in the header
	Sub string `protobuf:"bytes,2,opt,name=sub,proto3" json:"sub,omitempty" bson:"sub"` // @gotags: bson:"sub"
	// username - The username of the user. Does not need to be unique as primary lookup for the user is done via userId
	Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty" bson:"username"` // @gotags: bson:"username"
	// email - The primary email address for the user. Must be unique
	Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty" bson:"email"` // @gotags: bson:"email"
	// email_verified - A boolean value describing if the user has validated there email address
	EmailVerified bool `protobuf:"varint,5,opt,name=email_verified,json=emailVerified,proto3" json:"email_verified,omitempty" bson:"email_verified"` // @gotags: bson:"email_verified"
	// given_name - The users first name. Can be null, and does not need to be unique
	GivenName string `protobuf:"bytes,6,opt,name=given_name,json=givenName,proto3" json:"given_name,omitempty" bson:"given_name"` // @gotags: bson:"given_name"
	// middle_name - The users middle name. Can be null, and does not need to be unique
	MiddleName string `protobuf:"bytes,7,opt,name=middle_name,json=middleName,proto3" json:"middle_name,omitempty" bson:"middle_name"` // @gotags: bson:"middle_name"
	// family_name - The users last name. Can be null, and does not need to be unique
	FamilyName string `protobuf:"bytes,8,opt,name=family_name,json=familyName,proto3" json:"family_name,omitempty" bson:"family_name"` // @gotags: bson:"family_name"
	// gender - The users gender. Can be null
	Gender string `protobuf:"bytes,9,opt,name=gender,proto3" json:"gender,omitempty" bson:"gender"` // @gotags: bson:"gender"
	// birth_date - The users birthdate represented as YYYY-MM-DD
	BirthDate string `protobuf:"bytes,10,opt,name=birth_date,json=birthDate,proto3" json:"birth_date,omitempty" bson:"birth_date"` // @gotags: bson:"birth_date"
	// zone_info - The timezone for the user that should be respected by timestamps. Defaults to America/New_York
	ZoneInfo string `protobuf:"bytes,11,opt,name=zone_info,json=zoneInfo,proto3" json:"zone_info,omitempty" bson:"zone_info"` // @gotags: bson:"zone_info"
	// phone_number - The users phone number in the following format +1800-555-555
	PhoneNumber string `protobuf:"bytes,12,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty" bson:"phone_number"` // @gotags: bson:"phone_number"
	// phone_number_verified - A boolean value describing if the user has validated there email address
	PhoneNumberVerified bool `` // @gotags: bson:"phone_number_verified"
	/* 151-byte string literal not displayed */
	// address - The users physical mailing address. Can be null
	Address string `protobuf:"bytes,14,opt,name=address,proto3" json:"address,omitempty" bson:"address"` // @gotags: bson:"address"
	// credential - A message representing the users hashed password. Will be left null when exporting unless explicitly declared
	Credential *UserCredential `protobuf:"bytes,15,opt,name=credential,proto3" json:"credential,omitempty" bson:"credential"` // @gotags: bson:"credential"
	// scopes - A list of scope ID's that were directly assigned to the user
	Scopes []string `protobuf:"bytes,16,rep,name=scopes,proto3" json:"scopes,omitempty" bson:"scopes"` // @gotags: bson:"scopes"
	// roles - A list of role ID's that were directly assigned to the user
	Roles []string `protobuf:"bytes,17,rep,name=roles,proto3" json:"roles,omitempty" bson:"roles"` // @gotags: bson:"roles"
	// contains filtered or unexported fields
}

User - Represents a user registered with CredStack. Describes all standard claims for the OpenID Connect spec

func (*User) Descriptor deprecated

func (*User) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAddress

func (x *User) GetAddress() string

func (*User) GetBirthDate

func (x *User) GetBirthDate() string

func (*User) GetCredential

func (x *User) GetCredential() *UserCredential

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetEmailVerified

func (x *User) GetEmailVerified() bool

func (*User) GetFamilyName

func (x *User) GetFamilyName() string

func (*User) GetGender

func (x *User) GetGender() string

func (*User) GetGivenName

func (x *User) GetGivenName() string

func (*User) GetHeader

func (x *User) GetHeader() *header.Header

func (*User) GetMiddleName

func (x *User) GetMiddleName() string

func (*User) GetPhoneNumber

func (x *User) GetPhoneNumber() string

func (*User) GetPhoneNumberVerified

func (x *User) GetPhoneNumberVerified() bool

func (*User) GetRoles

func (x *User) GetRoles() []string

func (*User) GetScopes

func (x *User) GetScopes() []string

func (*User) GetSub

func (x *User) GetSub() string

func (*User) GetUsername

func (x *User) GetUsername() string

func (*User) GetZoneInfo

func (x *User) GetZoneInfo() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UserCredential

type UserCredential struct {

	// key - The user's hashed password represented as a string
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty" bson:"key"` // @gotags: bson:"key"
	// salt - The randomly generated salt used for hashing the users password
	Salt string `protobuf:"bytes,2,opt,name=salt,proto3" json:"salt,omitempty" bson:"salt"` // @gotags: bson:"salt"
	// time - The time used as a cost parameter when hashing user passwords. Usually is 1
	Time uint32 `protobuf:"varint,3,opt,name=time,proto3" json:"time,omitempty" bson:"time"` // @gotags: bson:"time"
	// memory - The amount of memory to be used when hashing passwords. Usually 64MB's but can be modified for slower systems
	Memory uint32 `protobuf:"varint,4,opt,name=memory,proto3" json:"memory,omitempty" bson:"memory"` // @gotags: bson:"memory"
	// threads - The number of threads (or go-routines in our case) that should be used when hashing passwords
	Threads uint32 `protobuf:"varint,5,opt,name=threads,proto3" json:"threads,omitempty" bson:"threads"` // @gotags: bson:"threads"
	// key_length - The length of the generated password hash. Usually 32 or 64
	KeyLength uint32 `protobuf:"varint,6,opt,name=key_length,json=keyLength,proto3" json:"key_length,omitempty" bson:"key_length"` // @gotags: bson:"key_length"
	// salt_length - The length of the generated password salt. Usually 32
	SaltLength uint32 `protobuf:"varint,7,opt,name=salt_length,json=saltLength,proto3" json:"salt_length,omitempty" bson:"salt_length"` // @gotags: bson:"salt_length"
	// contains filtered or unexported fields
}

UserCredential - Represents the users hashed password and the parameters used to hash it. Hashing is performed with Argon2id as recommended OWASP

func (*UserCredential) Descriptor deprecated

func (*UserCredential) Descriptor() ([]byte, []int)

Deprecated: Use UserCredential.ProtoReflect.Descriptor instead.

func (*UserCredential) GetKey

func (x *UserCredential) GetKey() string

func (*UserCredential) GetKeyLength

func (x *UserCredential) GetKeyLength() uint32

func (*UserCredential) GetMemory

func (x *UserCredential) GetMemory() uint32

func (*UserCredential) GetSalt

func (x *UserCredential) GetSalt() string

func (*UserCredential) GetSaltLength

func (x *UserCredential) GetSaltLength() uint32

func (*UserCredential) GetThreads

func (x *UserCredential) GetThreads() uint32

func (*UserCredential) GetTime

func (x *UserCredential) GetTime() uint32

func (*UserCredential) ProtoMessage

func (*UserCredential) ProtoMessage()

func (*UserCredential) ProtoReflect

func (x *UserCredential) ProtoReflect() protoreflect.Message

func (*UserCredential) Reset

func (x *UserCredential) Reset()

func (*UserCredential) String

func (x *UserCredential) String() string

Jump to

Keyboard shortcuts

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