core

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_storage_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type StoredToken

type StoredToken struct {

	// bcrypted version of the token that was issued to the user
	Bcrypted []byte `protobuf:"bytes,1,opt,name=bcrypted,proto3" json:"bcrypted,omitempty"`
	// when this token expires
	ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expires_at,proto3" json:"expires_at,omitempty"`
	// contains filtered or unexported fields
}

StoredToken represents the session-persisted state of a token we issued to a user

func (*StoredToken) Descriptor deprecated

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

Deprecated: Use StoredToken.ProtoReflect.Descriptor instead.

func (*StoredToken) GetBcrypted

func (x *StoredToken) GetBcrypted() []byte

func (*StoredToken) GetExpiresAt

func (x *StoredToken) GetExpiresAt() *timestamppb.Timestamp

func (*StoredToken) ProtoMessage

func (*StoredToken) ProtoMessage()

func (*StoredToken) ProtoReflect

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

func (*StoredToken) Reset

func (x *StoredToken) Reset()

func (*StoredToken) String

func (x *StoredToken) String() string

type UserToken

type UserToken struct {

	// the ID of the session this token corresponds to
	SessionId string `protobuf:"bytes,1,opt,name=session_id,proto3" json:"session_id,omitempty"`
	// the token itself, to be compared to the bcrypt version on the backend
	Token []byte `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

UserToken is the value we issue directly to users. The message is serialized, then base64 encoded to make up the issued version.

func (*UserToken) Descriptor deprecated

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

Deprecated: Use UserToken.ProtoReflect.Descriptor instead.

func (*UserToken) GetSessionId

func (x *UserToken) GetSessionId() string

func (*UserToken) GetToken

func (x *UserToken) GetToken() []byte

func (*UserToken) ProtoMessage

func (*UserToken) ProtoMessage()

func (*UserToken) ProtoReflect

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

func (*UserToken) Reset

func (x *UserToken) Reset()

func (*UserToken) String

func (x *UserToken) String() string

Jump to

Keyboard shortcuts

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