Documentation ¶
Index ¶
- type MockOauthTokenService
- func (m *MockOauthTokenService) GetCurrentOAuthToken(ctx context.Context, usr *user.SignedInUser) *oauth2.Token
- func (m *MockOauthTokenService) HasOAuthEntry(ctx context.Context, usr *user.SignedInUser) (*login.UserAuth, bool, error)
- func (m *MockOauthTokenService) InvalidateOAuthTokens(ctx context.Context, usr *login.UserAuth) error
- func (m *MockOauthTokenService) IsOAuthPassThruEnabled(ds *datasources.DataSource) bool
- func (m *MockOauthTokenService) TryTokenRefresh(ctx context.Context, usr *login.UserAuth) error
- type Service
- func (s *Service) GetCurrentOAuthToken(context.Context, *user.SignedInUser) *oauth2.Token
- func (s *Service) HasOAuthEntry(context.Context, *user.SignedInUser) (*login.UserAuth, bool, error)
- func (s *Service) InvalidateOAuthTokens(context.Context, *login.UserAuth) error
- func (s *Service) IsOAuthPassThruEnabled(ds *datasources.DataSource) bool
- func (s *Service) TryTokenRefresh(context.Context, *login.UserAuth) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockOauthTokenService ¶
type MockOauthTokenService struct { GetCurrentOauthTokenFunc func(ctx context.Context, usr *user.SignedInUser) *oauth2.Token IsOAuthPassThruEnabledFunc func(ds *datasources.DataSource) bool HasOAuthEntryFunc func(ctx context.Context, usr *user.SignedInUser) (*login.UserAuth, bool, error) InvalidateOAuthTokensFunc func(ctx context.Context, usr *login.UserAuth) error TryTokenRefreshFunc func(ctx context.Context, usr *login.UserAuth) error }
func (*MockOauthTokenService) GetCurrentOAuthToken ¶
func (m *MockOauthTokenService) GetCurrentOAuthToken(ctx context.Context, usr *user.SignedInUser) *oauth2.Token
func (*MockOauthTokenService) HasOAuthEntry ¶
func (m *MockOauthTokenService) HasOAuthEntry(ctx context.Context, usr *user.SignedInUser) (*login.UserAuth, bool, error)
func (*MockOauthTokenService) InvalidateOAuthTokens ¶
func (*MockOauthTokenService) IsOAuthPassThruEnabled ¶
func (m *MockOauthTokenService) IsOAuthPassThruEnabled(ds *datasources.DataSource) bool
func (*MockOauthTokenService) TryTokenRefresh ¶
type Service ¶
Service an OAuth token service suitable for tests.
func ProvideService ¶
func ProvideService() *Service
ProvideService provides an OAuth token service suitable for tests.
func (*Service) GetCurrentOAuthToken ¶
func (*Service) HasOAuthEntry ¶
func (*Service) InvalidateOAuthTokens ¶
func (*Service) IsOAuthPassThruEnabled ¶
func (s *Service) IsOAuthPassThruEnabled(ds *datasources.DataSource) bool
Click to show internal directories.
Click to hide internal directories.