oauth

package
v0.0.0-...-e9c30ff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMaximumConnectionsReached = errors.New("maximum number of connections to this service reached")

ErrMaximumConnectionsReached is returned when a user has reached their maximum number of connections to a service

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager manages oauth account association requests

func NewManager

func NewManager() *Manager

NewManager returns a new oauth manager

func (*Manager) BeginFlow

func (m *Manager) BeginFlow(ctxCtx context.Context, service types.ConnectionService, user auth.User, callback ServiceCallbackFunction) (string, error)

func (*Manager) CompleteFlow

func (m *Manager) CompleteFlow(ctxCtx context.Context, state string, code string) error

func (*Manager) RegisterConnectionService

func (m *Manager) RegisterConnectionService(service types.ConnectionService, config *oauth2.Config)

type ServiceCallbackFunction

type ServiceCallbackFunction func(context.Context, *oauth2.Token, *types.Connection) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL