Documentation
¶
Index ¶
- Variables
- func ApplyDefaults(config *kascfg.ConfigurationFile)
- type AuthStore
- type Factory
- type OAuthState
- func (*OAuthState) Descriptor() ([]byte, []int)deprecated
- func (x *OAuthState) GetCodeVerifier() string
- func (x *OAuthState) GetCreatedAt() *timestamppb.Timestamp
- func (x *OAuthState) GetOriginalUrl() string
- func (x *OAuthState) GetStateValue() string
- func (oauthState *OAuthState) IsValid(ttl time.Duration, state string) bool
- func (*OAuthState) ProtoMessage()
- func (x *OAuthState) ProtoReflect() protoreflect.Message
- func (x *OAuthState) Reset()
- func (x *OAuthState) String() string
- type OAuthStateParam
- func (*OAuthStateParam) Descriptor() ([]byte, []int)deprecated
- func (x *OAuthStateParam) GetCreatedAt() *timestamppb.Timestamp
- func (x *OAuthStateParam) GetNonce() string
- func (x *OAuthStateParam) GetOriginalUrl() string
- func (osp *OAuthStateParam) IsValid(ttl time.Duration) bool
- func (*OAuthStateParam) ProtoMessage()
- func (x *OAuthStateParam) ProtoReflect() protoreflect.Message
- func (x *OAuthStateParam) Reset()
- func (x *OAuthStateParam) String() string
- type RedisAuthStore
- func (r *RedisAuthStore) DeleteOAuthState(ctx context.Context, stateValue string) error
- func (r *RedisAuthStore) DeleteTransferToken(ctx context.Context, token string) error
- func (r *RedisAuthStore) DeleteUserSession(ctx context.Context, token string) error
- func (r *RedisAuthStore) GetOAuthState(ctx context.Context, stateValue string) (*OAuthState, error)
- func (r *RedisAuthStore) GetTransferToken(ctx context.Context, token string) (*TransferToken, error)
- func (r *RedisAuthStore) GetUserSession(ctx context.Context, sessionID string) (*UserSession, error)
- func (r *RedisAuthStore) StoreOAuthState(ctx context.Context, stateValue string, state *OAuthState) error
- func (r *RedisAuthStore) StoreTransferToken(ctx context.Context, token string, tt *TransferToken) error
- func (r *RedisAuthStore) StoreUserSession(ctx context.Context, sessionID string, us *UserSession) error
- type TransferError
- func (*TransferError) Descriptor() ([]byte, []int)deprecated
- func (x *TransferError) GetHttpStatusCode() uint32
- func (x *TransferError) GetMessage() string
- func (x *TransferError) GetOriginalUrl() string
- func (te *TransferError) IsValid(host string) (bool, error)
- func (*TransferError) ProtoMessage()
- func (x *TransferError) ProtoReflect() protoreflect.Message
- func (x *TransferError) Reset()
- func (x *TransferError) String() string
- type TransferToken
- func (*TransferToken) Descriptor() ([]byte, []int)deprecated
- func (x *TransferToken) GetCreatedAt() *timestamppb.Timestamp
- func (x *TransferToken) GetOriginalUrl() string
- func (x *TransferToken) GetUser() *User
- func (x *TransferToken) GetWorkspace() *Workspace
- func (tt *TransferToken) IsValid(ttl time.Duration, host string) (bool, error)
- func (*TransferToken) ProtoMessage()
- func (x *TransferToken) ProtoReflect() protoreflect.Message
- func (x *TransferToken) Reset()
- func (x *TransferToken) String() string
- type User
- type UserSession
- func (*UserSession) Descriptor() ([]byte, []int)deprecated
- func (x *UserSession) GetCreatedAt() *timestamppb.Timestamp
- func (x *UserSession) GetHost() string
- func (x *UserSession) GetUser() *User
- func (x *UserSession) GetWorkspace() *Workspace
- func (us *UserSession) IsValid(ttl time.Duration, host string) bool
- func (*UserSession) ProtoMessage()
- func (x *UserSession) ProtoReflect() protoreflect.Message
- func (x *UserSession) Reset()
- func (x *UserSession) String() string
- type Workspace
Constants ¶
This section is empty.
Variables ¶
View Source
var File_internal_module_workspaces_server_auth_proto protoreflect.FileDescriptor
Functions ¶
func ApplyDefaults ¶
func ApplyDefaults(config *kascfg.ConfigurationFile)
Types ¶
type AuthStore ¶
type AuthStore interface {
StoreOAuthState(ctx context.Context, stateValue string, state *OAuthState) error
GetOAuthState(ctx context.Context, stateValue string) (*OAuthState, error)
DeleteOAuthState(ctx context.Context, stateValue string) error
StoreTransferToken(ctx context.Context, token string, tt *TransferToken) error
GetTransferToken(ctx context.Context, token string) (*TransferToken, error)
DeleteTransferToken(ctx context.Context, token string) error
StoreUserSession(ctx context.Context, sessionID string, us *UserSession) error
GetUserSession(ctx context.Context, sessionID string) (*UserSession, error)
DeleteUserSession(ctx context.Context, token string) error
}
AuthStore handles Redis operations for authentication data
type OAuthState ¶
type OAuthState struct {
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created_at" json:"created_at,omitempty"`
OriginalUrl string `protobuf:"bytes,2,opt,name=original_url" json:"original_url,omitempty"`
CodeVerifier string `protobuf:"bytes,3,opt,name=code_verifier" json:"code_verifier,omitempty"`
StateValue string `protobuf:"bytes,4,opt,name=state_value" json:"state_value,omitempty"`
// contains filtered or unexported fields
}
func (*OAuthState) Descriptor
deprecated
func (*OAuthState) Descriptor() ([]byte, []int)
Deprecated: Use OAuthState.ProtoReflect.Descriptor instead.
func (*OAuthState) GetCodeVerifier ¶
func (x *OAuthState) GetCodeVerifier() string
func (*OAuthState) GetCreatedAt ¶
func (x *OAuthState) GetCreatedAt() *timestamppb.Timestamp
func (*OAuthState) GetOriginalUrl ¶
func (x *OAuthState) GetOriginalUrl() string
func (*OAuthState) GetStateValue ¶
func (x *OAuthState) GetStateValue() string
func (*OAuthState) IsValid ¶
func (oauthState *OAuthState) IsValid(ttl time.Duration, state string) bool
func (*OAuthState) ProtoMessage ¶
func (*OAuthState) ProtoMessage()
func (*OAuthState) ProtoReflect ¶
func (x *OAuthState) ProtoReflect() protoreflect.Message
func (*OAuthState) Reset ¶
func (x *OAuthState) Reset()
func (*OAuthState) String ¶
func (x *OAuthState) String() string
type OAuthStateParam ¶
type OAuthStateParam struct {
Nonce string `protobuf:"bytes,1,opt,name=nonce" json:"nonce,omitempty"`
OriginalUrl string `protobuf:"bytes,2,opt,name=original_url" json:"original_url,omitempty"`
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at" json:"created_at,omitempty"`
// contains filtered or unexported fields
}
func (*OAuthStateParam) Descriptor
deprecated
func (*OAuthStateParam) Descriptor() ([]byte, []int)
Deprecated: Use OAuthStateParam.ProtoReflect.Descriptor instead.
func (*OAuthStateParam) GetCreatedAt ¶
func (x *OAuthStateParam) GetCreatedAt() *timestamppb.Timestamp
func (*OAuthStateParam) GetNonce ¶
func (x *OAuthStateParam) GetNonce() string
func (*OAuthStateParam) GetOriginalUrl ¶
func (x *OAuthStateParam) GetOriginalUrl() string
func (*OAuthStateParam) ProtoMessage ¶
func (*OAuthStateParam) ProtoMessage()
func (*OAuthStateParam) ProtoReflect ¶
func (x *OAuthStateParam) ProtoReflect() protoreflect.Message
func (*OAuthStateParam) Reset ¶
func (x *OAuthStateParam) Reset()
func (*OAuthStateParam) String ¶
func (x *OAuthStateParam) String() string
type RedisAuthStore ¶
type RedisAuthStore struct {
// contains filtered or unexported fields
}
RedisAuthStore implements AuthStore using Redis
func NewRedisAuthStore ¶
func NewRedisAuthStore(client rueidis.Client, keyPrefix string, oauthStateStateTTL, userSessionTTL, transferTokenTTL time.Duration) *RedisAuthStore
NewRedisAuthStore creates a new Redis-based auth store
func (*RedisAuthStore) DeleteOAuthState ¶
func (r *RedisAuthStore) DeleteOAuthState(ctx context.Context, stateValue string) error
func (*RedisAuthStore) DeleteTransferToken ¶
func (r *RedisAuthStore) DeleteTransferToken(ctx context.Context, token string) error
func (*RedisAuthStore) DeleteUserSession ¶
func (r *RedisAuthStore) DeleteUserSession(ctx context.Context, token string) error
func (*RedisAuthStore) GetOAuthState ¶
func (r *RedisAuthStore) GetOAuthState(ctx context.Context, stateValue string) (*OAuthState, error)
func (*RedisAuthStore) GetTransferToken ¶
func (r *RedisAuthStore) GetTransferToken(ctx context.Context, token string) (*TransferToken, error)
func (*RedisAuthStore) GetUserSession ¶
func (r *RedisAuthStore) GetUserSession(ctx context.Context, sessionID string) (*UserSession, error)
func (*RedisAuthStore) StoreOAuthState ¶
func (r *RedisAuthStore) StoreOAuthState(ctx context.Context, stateValue string, state *OAuthState) error
func (*RedisAuthStore) StoreTransferToken ¶
func (r *RedisAuthStore) StoreTransferToken(ctx context.Context, token string, tt *TransferToken) error
func (*RedisAuthStore) StoreUserSession ¶
func (r *RedisAuthStore) StoreUserSession(ctx context.Context, sessionID string, us *UserSession) error
type TransferError ¶
type TransferError struct {
OriginalUrl string `protobuf:"bytes,1,opt,name=original_url" json:"original_url,omitempty"`
HttpStatusCode uint32 `protobuf:"varint,2,opt,name=http_status_code" json:"http_status_code,omitempty"`
Message string `protobuf:"bytes,3,opt,name=message" json:"message,omitempty"`
// contains filtered or unexported fields
}
func (*TransferError) Descriptor
deprecated
func (*TransferError) Descriptor() ([]byte, []int)
Deprecated: Use TransferError.ProtoReflect.Descriptor instead.
func (*TransferError) GetHttpStatusCode ¶
func (x *TransferError) GetHttpStatusCode() uint32
func (*TransferError) GetMessage ¶
func (x *TransferError) GetMessage() string
func (*TransferError) GetOriginalUrl ¶
func (x *TransferError) GetOriginalUrl() string
func (*TransferError) ProtoMessage ¶
func (*TransferError) ProtoMessage()
func (*TransferError) ProtoReflect ¶
func (x *TransferError) ProtoReflect() protoreflect.Message
func (*TransferError) Reset ¶
func (x *TransferError) Reset()
func (*TransferError) String ¶
func (x *TransferError) String() string
type TransferToken ¶
type TransferToken struct {
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created_at" json:"created_at,omitempty"`
OriginalUrl string `protobuf:"bytes,2,opt,name=original_url" json:"original_url,omitempty"`
User *User `protobuf:"bytes,3,opt,name=user" json:"user,omitempty"`
Workspace *Workspace `protobuf:"bytes,4,opt,name=workspace" json:"workspace,omitempty"`
// contains filtered or unexported fields
}
func (*TransferToken) Descriptor
deprecated
func (*TransferToken) Descriptor() ([]byte, []int)
Deprecated: Use TransferToken.ProtoReflect.Descriptor instead.
func (*TransferToken) GetCreatedAt ¶
func (x *TransferToken) GetCreatedAt() *timestamppb.Timestamp
func (*TransferToken) GetOriginalUrl ¶
func (x *TransferToken) GetOriginalUrl() string
func (*TransferToken) GetUser ¶
func (x *TransferToken) GetUser() *User
func (*TransferToken) GetWorkspace ¶
func (x *TransferToken) GetWorkspace() *Workspace
func (*TransferToken) ProtoMessage ¶
func (*TransferToken) ProtoMessage()
func (*TransferToken) ProtoReflect ¶
func (x *TransferToken) ProtoReflect() protoreflect.Message
func (*TransferToken) Reset ¶
func (x *TransferToken) Reset()
func (*TransferToken) String ¶
func (x *TransferToken) String() string
type User ¶
type User struct {
Id int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
// contains filtered or unexported fields
}
func (*User) Descriptor
deprecated
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserSession ¶
type UserSession struct {
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created_at" json:"created_at,omitempty"`
Host string `protobuf:"bytes,2,opt,name=host" json:"host,omitempty"`
User *User `protobuf:"bytes,3,opt,name=user" json:"user,omitempty"`
Workspace *Workspace `protobuf:"bytes,4,opt,name=workspace" json:"workspace,omitempty"`
// contains filtered or unexported fields
}
func (*UserSession) Descriptor
deprecated
func (*UserSession) Descriptor() ([]byte, []int)
Deprecated: Use UserSession.ProtoReflect.Descriptor instead.
func (*UserSession) GetCreatedAt ¶
func (x *UserSession) GetCreatedAt() *timestamppb.Timestamp
func (*UserSession) GetHost ¶
func (x *UserSession) GetHost() string
func (*UserSession) GetUser ¶
func (x *UserSession) GetUser() *User
func (*UserSession) GetWorkspace ¶
func (x *UserSession) GetWorkspace() *Workspace
func (*UserSession) ProtoMessage ¶
func (*UserSession) ProtoMessage()
func (*UserSession) ProtoReflect ¶
func (x *UserSession) ProtoReflect() protoreflect.Message
func (*UserSession) Reset ¶
func (x *UserSession) Reset()
func (*UserSession) String ¶
func (x *UserSession) String() string
type Workspace ¶
type Workspace struct {
Id int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
Port uint32 `protobuf:"varint,2,opt,name=port" json:"port,omitempty"`
// contains filtered or unexported fields
}
func (*Workspace) Descriptor
deprecated
func (*Workspace) ProtoMessage ¶
func (*Workspace) ProtoMessage()
func (*Workspace) ProtoReflect ¶
func (x *Workspace) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.