usecases

package
v1.50.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthorizeUseCase

func NewAuthorizeUseCase(
	registry *services.ProviderRegistry,
	logger models.Logger,
	trustedOrigins []string,
	hmacKey []byte,
) *authorizeUseCase

func NewCallbackUseCase

func NewCallbackUseCase(
	globalConfig *models.Config,
	registry *services.ProviderRegistry,
	logger models.Logger,
	hmacKey []byte,
	userService rootservices.UserService,
	accountService rootservices.AccountService,
	sessionService rootservices.SessionService,
	tokenService rootservices.TokenService,
) *callbackUseCase

Types

type AuthorizeResult

type AuthorizeResult struct {
	AuthorizationURL string
	StateCookie      string
	VerifierCookie   *string
	RedirectCookie   string
}

AuthorizeResult contains the result of an authorization request

type AuthorizeUseCase

type AuthorizeUseCase interface {
	Authorize(ctx context.Context, req *types.AuthorizeRequest) (*AuthorizeResult, error)
}

AuthorizeUseCase is the handler-facing contract for starting an OAuth2 flow.

type CallbackUseCase

type CallbackUseCase interface {
	Callback(ctx context.Context, req *types.CallbackRequest, ipAddress *string, userAgent *string) (*types.CallbackResult, error)
}

CallbackUseCase is the handler-facing contract for completing an OAuth2 flow.

type UseCases

type UseCases struct {
	AuthorizeUseCase AuthorizeUseCase
	CallbackUseCase  CallbackUseCase
}

Jump to

Keyboard shortcuts

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