oauth

package
v0.0.0-...-c4f7e29 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DependencySet = wire.NewSet(
	wire.Struct(new(Store), "*"),
	wire.Struct(new(Provider), "*"),
)

Functions

This section is empty.

Types

type Provider

type Provider struct {
	Store          *Store
	Clock          clock.Clock
	IdentityConfig *config.IdentityConfig
}

func (*Provider) Create

func (p *Provider) Create(i *identity.OAuth) error

func (*Provider) Delete

func (p *Provider) Delete(i *identity.OAuth) error

func (*Provider) Get

func (p *Provider) Get(userID, id string) (*identity.OAuth, error)

func (*Provider) GetByProviderSubject

func (p *Provider) GetByProviderSubject(provider config.ProviderID, subjectID string) (*identity.OAuth, error)

func (*Provider) GetByUserProvider

func (p *Provider) GetByUserProvider(userID string, provider config.ProviderID) (*identity.OAuth, error)

func (*Provider) GetMany

func (p *Provider) GetMany(ids []string) ([]*identity.OAuth, error)

func (*Provider) List

func (p *Provider) List(userID string) ([]*identity.OAuth, error)

func (*Provider) ListByClaim

func (p *Provider) ListByClaim(name string, value string) ([]*identity.OAuth, error)

func (*Provider) New

func (p *Provider) New(
	userID string,
	provider config.ProviderID,
	subjectID string,
	profile map[string]interface{},
	claims map[string]interface{},
) *identity.OAuth

func (*Provider) Update

func (p *Provider) Update(i *identity.OAuth) error

func (*Provider) WithUpdate

func (p *Provider) WithUpdate(
	iden *identity.OAuth,
	rawProfile map[string]interface{},
	claims map[string]interface{},
) *identity.OAuth

type Store

type Store struct {
	SQLBuilder     *appdb.SQLBuilderApp
	SQLExecutor    *appdb.SQLExecutor
	IdentityConfig *config.IdentityConfig
}

func (*Store) Create

func (s *Store) Create(i *identity.OAuth) (err error)

func (*Store) Delete

func (s *Store) Delete(i *identity.OAuth) error

func (*Store) Get

func (s *Store) Get(userID string, id string) (*identity.OAuth, error)

func (*Store) GetByProviderSubject

func (s *Store) GetByProviderSubject(provider config.ProviderID, subjectID string) (*identity.OAuth, error)

func (*Store) GetByUserProvider

func (s *Store) GetByUserProvider(userID string, provider config.ProviderID) (*identity.OAuth, error)

func (*Store) GetMany

func (s *Store) GetMany(ids []string) ([]*identity.OAuth, error)

func (*Store) List

func (s *Store) List(userID string) ([]*identity.OAuth, error)

func (*Store) ListByClaim

func (s *Store) ListByClaim(name string, value string) ([]*identity.OAuth, error)

func (*Store) Update

func (s *Store) Update(i *identity.OAuth) error

Jump to

Keyboard shortcuts

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