connect

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2022 License: BSD-2-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnnectRessource

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

func NewConnnectRessource

func NewConnnectRessource(logger *zap.Logger,
	issuer *tokens.TokenIssuer,
	rotator *tokens.TokenRotator,
	userSignIn *user.SigninService,
	validator *validator.Validate,
	authService *authorization.Service,
	appService *application.Service,
	verifier *tokens.TokenVerifier) *ConnnectRessource

func (*ConnnectRessource) PasswordGrant

PasswordGrant is public so we can re-use this flow for the netlify wrapper

func (*ConnnectRessource) RefreshTokenGrant

func (c *ConnnectRessource) RefreshTokenGrant(
	req *RefreshTokenTokenRequest,
	w http.ResponseWriter,
	r *http.Request,
)

RefreshTokenGrant handles the refresh_token grant, public because it used in netlify api as well

func (*ConnnectRessource) Router

func (c *ConnnectRessource) Router() *chi.Mux

type PasswordGrantTokenRequest

type PasswordGrantTokenRequest struct {
	Username     string
	Password     string
	ClientID     string
	ClientSecret string
	Scope        string

	IssueNetlifyToken bool
}

PasswordGrantTokenRequest wraps everything from the password grant request

type RefreshTokenTokenRequest

type RefreshTokenTokenRequest struct {
	RefreshToken string
	ClientID     string
	ClientSecret string
	Scope        string

	IssueNetlifyToken bool
}

Jump to

Keyboard shortcuts

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