Documentation
¶
Index ¶
- Constants
- Variables
- type APIOptions
- type DeviceOptions
- type GithubOptions
- type GoogleOptions
- type InvalidatedSession
- type MagicOptions
- type MailerOptions
- type Manager
- func (m *Manager) Close() error
- func (m *Manager) Configuration() *configuration.Configuration
- func (m *Manager) CreateExistingSession(ctx context.Context, identifier string) (credential.Session, error)
- func (m *Manager) CreateSession(ctx context.Context, data flow.Data, provider flow.Provider) (credential.Session, error)
- func (m *Manager) Database() *db.DB
- func (m *Manager) Device() *device.Device
- func (m *Manager) Github() *github.Github
- func (m *Manager) Google() *google.Google
- func (m *Manager) IsHealthy() bool
- func (m *Manager) IsSessionInvalidated(identifier string, generation uint32) bool
- func (m *Manager) IsSessionRevoked(identifier string) bool
- func (m *Manager) Magic() *magic.Magic
- func (m *Manager) Mailer() mailer.Mailer
- func (m *Manager) ParseSession(token string) (credential.Session, bool, error)
- func (m *Manager) RefreshSession(ctx context.Context, session credential.Session) (credential.Session, error)
- func (m *Manager) RevokeSession(ctx context.Context, identifier string) error
- func (m *Manager) SessionInvalidationList() []InvalidatedSession
- func (m *Manager) SessionRevocationList() []string
- func (m *Manager) SignSession(session credential.Session) (string, error)
- func (m *Manager) ValidateSession(ctx context.Context, token string) (credential.Session, bool, error)
- type Options
Constants ¶
Variables ¶
View Source
var ( ErrCreatingManager = errors.New("error creating manager") ErrDBIsRequired = errors.New("db is required") ErrCreatingSession = errors.New("error creating session") ErrRefreshingSession = errors.New("error refreshing session") ErrRevokingSession = errors.New("error revoking session") ErrInvalidProvider = errors.New("invalid provider") ErrInvalidFlowData = errors.New("invalid flow data") ErrSessionIsExpired = errors.New("session is expired") ErrInvalidSessionRole = errors.New("invalid session role") ErrValidatingSession = errors.New("error validating session") ErrRevokedSession = errors.New("revoked session") )
Functions ¶
This section is empty.
Types ¶
type APIOptions ¶
type DeviceOptions ¶
type DeviceOptions struct {
Enabled bool
}
type GithubOptions ¶
type GoogleOptions ¶
type InvalidatedSession ¶
type MagicOptions ¶
type MagicOptions struct {
Enabled bool
}
type MailerOptions ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) Configuration ¶
func (m *Manager) Configuration() *configuration.Configuration
func (*Manager) CreateExistingSession ¶
func (*Manager) CreateSession ¶
func (*Manager) IsSessionInvalidated ¶
func (*Manager) IsSessionRevoked ¶
func (*Manager) ParseSession ¶
func (*Manager) RefreshSession ¶
func (m *Manager) RefreshSession(ctx context.Context, session credential.Session) (credential.Session, error)
func (*Manager) RevokeSession ¶
func (*Manager) SessionInvalidationList ¶
func (m *Manager) SessionInvalidationList() []InvalidatedSession
func (*Manager) SessionRevocationList ¶
func (*Manager) SignSession ¶
func (m *Manager) SignSession(session credential.Session) (string, error)
func (*Manager) ValidateSession ¶
type Options ¶
type Options struct {
Github GithubOptions
Google GoogleOptions
Magic MagicOptions
Device DeviceOptions
Mailer MailerOptions
Configuration configuration.Options
API APIOptions
}
Click to show internal directories.
Click to hide internal directories.