Documentation
¶
Overview ¶
Package session contains the business logic for creating providers from session state.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProviderSessionService ¶
type ProviderSessionService interface {
// CreateProviderFromSessionState creates a provider from the session
// state, storing the encrypted credentials as its access token. If the
// provider already exists, it is returned and the token is refreshed.
// If creation loses a race against a concurrent enrollment, the existing
// provider is returned together with the unique-violation error and no
// access token is stored; callers can detect that case with
// db.ErrIsUniqueViolation and continue with the returned provider.
CreateProviderFromSessionState(
ctx context.Context, providerClass db.ProviderClass,
encryptedCreds *crypto.EncryptedData, state string,
) (*db.Provider, error)
}
ProviderSessionService is the interface for creating providers from session state
func NewProviderSessionService ¶
func NewProviderSessionService( providerManager manager.ProviderManager, provGetter providerByNameGetter, dbStore dbSessionStore, ) ProviderSessionService
NewProviderSessionService creates a new provider session service
Click to show internal directories.
Click to hide internal directories.