Documentation
¶
Overview ¶
Package defaultstore implements the SQL-backed default store for the oauth plugin.
Index ¶
- type DefaultOAuthStore
- func (s *DefaultOAuthStore) CreateConnection(ctx context.Context, conn oauthtypes.Connection) (*oauthtypes.Connection, error)
- func (s *DefaultOAuthStore) DeleteConnection(ctx context.Context, provider, userID string) error
- func (s *DefaultOAuthStore) GetConnectionByProviderUserID(ctx context.Context, provider, providerUserID string) (*oauthtypes.Connection, error)
- func (s *DefaultOAuthStore) GetConnectionsByUserID(ctx context.Context, userID string) ([]oauthtypes.Connection, error)
- func (s *DefaultOAuthStore) UpdateConnection(ctx context.Context, conn oauthtypes.Connection) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultOAuthStore ¶
type DefaultOAuthStore struct {
// contains filtered or unexported fields
}
DefaultOAuthStore implements oauthtypes.Store using a SQL database.
func NewDefaultOAuthStore ¶
NewDefaultOAuthStore creates a DefaultOAuthStore for the given dialect.
func (*DefaultOAuthStore) CreateConnection ¶
func (s *DefaultOAuthStore) CreateConnection(ctx context.Context, conn oauthtypes.Connection) (*oauthtypes.Connection, error)
CreateConnection persists a new OAuth provider connection and returns it.
func (*DefaultOAuthStore) DeleteConnection ¶
func (s *DefaultOAuthStore) DeleteConnection(ctx context.Context, provider, userID string) error
DeleteConnection removes the OAuth connection for the given provider and user ID.
func (*DefaultOAuthStore) GetConnectionByProviderUserID ¶
func (s *DefaultOAuthStore) GetConnectionByProviderUserID(ctx context.Context, provider, providerUserID string) (*oauthtypes.Connection, error)
GetConnectionByProviderUserID retrieves an OAuth connection by provider name and the provider-assigned user ID.
func (*DefaultOAuthStore) GetConnectionsByUserID ¶
func (s *DefaultOAuthStore) GetConnectionsByUserID(ctx context.Context, userID string) ([]oauthtypes.Connection, error)
GetConnectionsByUserID returns all OAuth connections associated with a user.
func (*DefaultOAuthStore) UpdateConnection ¶
func (s *DefaultOAuthStore) UpdateConnection(ctx context.Context, conn oauthtypes.Connection) error
UpdateConnection updates an existing OAuth provider connection.