 Documentation
      ¶
      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 ¶ added in v18.3.0
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 ¶ added in v18.3.0
type OAuthState struct {
	CreatedAt    *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created_at,proto3" json:"created_at,omitempty"`
	OriginalUrl  string                 `protobuf:"bytes,2,opt,name=original_url,proto3" json:"original_url,omitempty"`
	CodeVerifier string                 `protobuf:"bytes,3,opt,name=code_verifier,proto3" json:"code_verifier,omitempty"`
	StateValue   string                 `protobuf:"bytes,4,opt,name=state_value,proto3" json:"state_value,omitempty"`
	// contains filtered or unexported fields
}
    
        
          
            func (*OAuthState) Descriptor
            deprecated
            
          
  
    
      added in
      v18.3.0
    
  
      
      func (*OAuthState) Descriptor() ([]byte, []int)
Deprecated: Use OAuthState.ProtoReflect.Descriptor instead.
func (*OAuthState) GetCodeVerifier ¶ added in v18.3.0
func (x *OAuthState) GetCodeVerifier() string
func (*OAuthState) GetCreatedAt ¶ added in v18.3.0
func (x *OAuthState) GetCreatedAt() *timestamppb.Timestamp
func (*OAuthState) GetOriginalUrl ¶ added in v18.3.0
func (x *OAuthState) GetOriginalUrl() string
func (*OAuthState) GetStateValue ¶ added in v18.3.0
func (x *OAuthState) GetStateValue() string
func (*OAuthState) IsValid ¶ added in v18.3.0
func (oauthState *OAuthState) IsValid(ttl time.Duration, state string) bool
func (*OAuthState) ProtoMessage ¶ added in v18.3.0
func (*OAuthState) ProtoMessage()
func (*OAuthState) ProtoReflect ¶ added in v18.3.0
func (x *OAuthState) ProtoReflect() protoreflect.Message
func (*OAuthState) Reset ¶ added in v18.3.0
func (x *OAuthState) Reset()
func (*OAuthState) String ¶ added in v18.3.0
func (x *OAuthState) String() string
type OAuthStateParam ¶ added in v18.3.0
type OAuthStateParam struct {
	Nonce       string                 `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"`
	OriginalUrl string                 `protobuf:"bytes,2,opt,name=original_url,proto3" json:"original_url,omitempty"`
	CreatedAt   *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,proto3" json:"created_at,omitempty"`
	// contains filtered or unexported fields
}
    
        
          
            func (*OAuthStateParam) Descriptor
            deprecated
            
          
  
    
      added in
      v18.3.0
    
  
      
      func (*OAuthStateParam) Descriptor() ([]byte, []int)
Deprecated: Use OAuthStateParam.ProtoReflect.Descriptor instead.
func (*OAuthStateParam) GetCreatedAt ¶ added in v18.3.0
func (x *OAuthStateParam) GetCreatedAt() *timestamppb.Timestamp
func (*OAuthStateParam) GetNonce ¶ added in v18.3.0
func (x *OAuthStateParam) GetNonce() string
func (*OAuthStateParam) GetOriginalUrl ¶ added in v18.3.0
func (x *OAuthStateParam) GetOriginalUrl() string
func (*OAuthStateParam) IsValid ¶ added in v18.3.0
func (osp *OAuthStateParam) IsValid(ttl time.Duration) bool
func (*OAuthStateParam) ProtoMessage ¶ added in v18.3.0
func (*OAuthStateParam) ProtoMessage()
func (*OAuthStateParam) ProtoReflect ¶ added in v18.3.0
func (x *OAuthStateParam) ProtoReflect() protoreflect.Message
func (*OAuthStateParam) Reset ¶ added in v18.3.0
func (x *OAuthStateParam) Reset()
func (*OAuthStateParam) String ¶ added in v18.3.0
func (x *OAuthStateParam) String() string
type RedisAuthStore ¶ added in v18.3.0
type RedisAuthStore struct {
	// contains filtered or unexported fields
}
    RedisAuthStore implements AuthStore using Redis
func NewRedisAuthStore ¶ added in v18.3.0
func NewRedisAuthStore(client rueidis.Client, keyPrefix string, oauthStateStateTTL, userSessionTTL, transferTokenTTL time.Duration) *RedisAuthStore
NewRedisAuthStore creates a new Redis-based auth store
func (*RedisAuthStore) DeleteOAuthState ¶ added in v18.3.0
func (r *RedisAuthStore) DeleteOAuthState(ctx context.Context, stateValue string) error
func (*RedisAuthStore) DeleteTransferToken ¶ added in v18.3.0
func (r *RedisAuthStore) DeleteTransferToken(ctx context.Context, token string) error
func (*RedisAuthStore) DeleteUserSession ¶ added in v18.3.0
func (r *RedisAuthStore) DeleteUserSession(ctx context.Context, token string) error
func (*RedisAuthStore) GetOAuthState ¶ added in v18.3.0
func (r *RedisAuthStore) GetOAuthState(ctx context.Context, stateValue string) (*OAuthState, error)
func (*RedisAuthStore) GetTransferToken ¶ added in v18.3.0
func (r *RedisAuthStore) GetTransferToken(ctx context.Context, token string) (*TransferToken, error)
func (*RedisAuthStore) GetUserSession ¶ added in v18.3.0
func (r *RedisAuthStore) GetUserSession(ctx context.Context, sessionID string) (*UserSession, error)
func (*RedisAuthStore) StoreOAuthState ¶ added in v18.3.0
func (r *RedisAuthStore) StoreOAuthState(ctx context.Context, stateValue string, state *OAuthState) error
func (*RedisAuthStore) StoreTransferToken ¶ added in v18.3.0
func (r *RedisAuthStore) StoreTransferToken(ctx context.Context, token string, tt *TransferToken) error
func (*RedisAuthStore) StoreUserSession ¶ added in v18.3.0
func (r *RedisAuthStore) StoreUserSession(ctx context.Context, sessionID string, us *UserSession) error
type TransferError ¶ added in v18.3.0
type TransferError struct {
	OriginalUrl    string `protobuf:"bytes,1,opt,name=original_url,proto3" json:"original_url,omitempty"`
	HttpStatusCode uint32 `protobuf:"varint,2,opt,name=http_status_code,proto3" json:"http_status_code,omitempty"`
	Message        string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}
    
        
          
            func (*TransferError) Descriptor
            deprecated
            
          
  
    
      added in
      v18.3.0
    
  
      
      func (*TransferError) Descriptor() ([]byte, []int)
Deprecated: Use TransferError.ProtoReflect.Descriptor instead.
func (*TransferError) GetHttpStatusCode ¶ added in v18.3.0
func (x *TransferError) GetHttpStatusCode() uint32
func (*TransferError) GetMessage ¶ added in v18.3.0
func (x *TransferError) GetMessage() string
func (*TransferError) GetOriginalUrl ¶ added in v18.3.0
func (x *TransferError) GetOriginalUrl() string
func (*TransferError) IsValid ¶ added in v18.3.0
func (te *TransferError) IsValid(host string) (bool, error)
func (*TransferError) ProtoMessage ¶ added in v18.3.0
func (*TransferError) ProtoMessage()
func (*TransferError) ProtoReflect ¶ added in v18.3.0
func (x *TransferError) ProtoReflect() protoreflect.Message
func (*TransferError) Reset ¶ added in v18.3.0
func (x *TransferError) Reset()
func (*TransferError) String ¶ added in v18.3.0
func (x *TransferError) String() string
type TransferToken ¶ added in v18.3.0
type TransferToken struct {
	CreatedAt   *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created_at,proto3" json:"created_at,omitempty"`
	OriginalUrl string                 `protobuf:"bytes,2,opt,name=original_url,proto3" json:"original_url,omitempty"`
	User        *User                  `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"`
	Workspace   *Workspace             `protobuf:"bytes,4,opt,name=workspace,proto3" json:"workspace,omitempty"`
	// contains filtered or unexported fields
}
    
        
          
            func (*TransferToken) Descriptor
            deprecated
            
          
  
    
      added in
      v18.3.0
    
  
      
      func (*TransferToken) Descriptor() ([]byte, []int)
Deprecated: Use TransferToken.ProtoReflect.Descriptor instead.
func (*TransferToken) GetCreatedAt ¶ added in v18.3.0
func (x *TransferToken) GetCreatedAt() *timestamppb.Timestamp
func (*TransferToken) GetOriginalUrl ¶ added in v18.3.0
func (x *TransferToken) GetOriginalUrl() string
func (*TransferToken) GetUser ¶ added in v18.3.0
func (x *TransferToken) GetUser() *User
func (*TransferToken) GetWorkspace ¶ added in v18.3.0
func (x *TransferToken) GetWorkspace() *Workspace
func (*TransferToken) ProtoMessage ¶ added in v18.3.0
func (*TransferToken) ProtoMessage()
func (*TransferToken) ProtoReflect ¶ added in v18.3.0
func (x *TransferToken) ProtoReflect() protoreflect.Message
func (*TransferToken) Reset ¶ added in v18.3.0
func (x *TransferToken) Reset()
func (*TransferToken) String ¶ added in v18.3.0
func (x *TransferToken) String() string
type User ¶ added in v18.3.0
type User struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}
    
        
          
            func (*User) Descriptor
            deprecated
            
          
  
    
      added in
      v18.3.0
    
  
      
      
    func (*User) ProtoMessage ¶ added in v18.3.0
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶ added in v18.3.0
func (x *User) ProtoReflect() protoreflect.Message
type UserSession ¶ added in v18.3.0
type UserSession struct {
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created_at,proto3" json:"created_at,omitempty"`
	Host      string                 `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"`
	User      *User                  `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"`
	Workspace *Workspace             `protobuf:"bytes,4,opt,name=workspace,proto3" json:"workspace,omitempty"`
	// contains filtered or unexported fields
}
    
        
          
            func (*UserSession) Descriptor
            deprecated
            
          
  
    
      added in
      v18.3.0
    
  
      
      func (*UserSession) Descriptor() ([]byte, []int)
Deprecated: Use UserSession.ProtoReflect.Descriptor instead.
func (*UserSession) GetCreatedAt ¶ added in v18.3.0
func (x *UserSession) GetCreatedAt() *timestamppb.Timestamp
func (*UserSession) GetHost ¶ added in v18.3.0
func (x *UserSession) GetHost() string
func (*UserSession) GetUser ¶ added in v18.3.0
func (x *UserSession) GetUser() *User
func (*UserSession) GetWorkspace ¶ added in v18.3.0
func (x *UserSession) GetWorkspace() *Workspace
func (*UserSession) IsValid ¶ added in v18.3.0
func (us *UserSession) IsValid(ttl time.Duration, host string) bool
func (*UserSession) ProtoMessage ¶ added in v18.3.0
func (*UserSession) ProtoMessage()
func (*UserSession) ProtoReflect ¶ added in v18.3.0
func (x *UserSession) ProtoReflect() protoreflect.Message
func (*UserSession) Reset ¶ added in v18.3.0
func (x *UserSession) Reset()
func (*UserSession) String ¶ added in v18.3.0
func (x *UserSession) String() string
type Workspace ¶ added in v18.3.0
type Workspace struct {
	Id   int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	// contains filtered or unexported fields
}
    
        
          
            func (*Workspace) Descriptor
            deprecated
            
          
  
    
      added in
      v18.3.0
    
  
      
      
    func (*Workspace) ProtoMessage ¶ added in v18.3.0
func (*Workspace) ProtoMessage()
func (*Workspace) ProtoReflect ¶ added in v18.3.0
func (x *Workspace) ProtoReflect() protoreflect.Message
 Click to show internal directories. 
   Click to hide internal directories.