oauth2

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Module(
	"oauth2",
	fx.Provide(
		New,
	),
)

Functions

This section is empty.

Types

type Provider

type Provider interface {
	// Validate valides the code with the oauth client and returns the user
	Validate(ctx context.Context, creds *model.ProviderCredentials, code, redirectUrl string) (*auth.Oauth2Claims, error)
	// RedirectUrl generates a redirect url for the oauth2 client
	RedirectUrl(redirectUrl, rigRedirect string, projectId uuid.UUID, creds *model.ProviderCredentials) (string, error)
	// Test validates if the oauth credentials are valid
	Test(ctx context.Context, privateKey, publicKey, redirectUrl string) error
}

type Providers

type Providers struct {
	Google   Provider
	Github   Provider
	Facebook Provider
}

func New

func New(logger *zap.Logger) (*Providers, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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