Documentation
¶
Index ¶
- func NewAuthorizeUseCase(registry *services.ProviderRegistry, logger models.Logger, ...) *authorizeUseCase
- func NewCallbackUseCase(globalConfig *models.Config, registry *services.ProviderRegistry, ...) *callbackUseCase
- type AuthorizeResult
- type AuthorizeUseCase
- type CallbackUseCase
- type RedirectError
- type UseCases
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAuthorizeUseCase ¶
func NewAuthorizeUseCase( registry *services.ProviderRegistry, logger models.Logger, trustedOrigins []string, flowStateRepo repositories.FlowStateRepository, tokenService rootservices.TokenService, flowStateTTL time.Duration, ) *authorizeUseCase
func NewCallbackUseCase ¶
func NewCallbackUseCase( globalConfig *models.Config, registry *services.ProviderRegistry, logger models.Logger, flowStateRepo repositories.FlowStateRepository, userService rootservices.UserService, accountService rootservices.AccountService, sessionService rootservices.SessionService, tokenService rootservices.TokenService, ) *callbackUseCase
Types ¶
type AuthorizeResult ¶
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 RedirectError ¶ added in v1.51.0
RedirectError asks the HTTP layer to redirect the browser instead of returning a JSON error. It is used for provider error callbacks when a trusted redirect_to was stored with the flow state.
func (*RedirectError) Error ¶ added in v1.51.0
func (e *RedirectError) Error() string
type UseCases ¶
type UseCases struct {
AuthorizeUseCase AuthorizeUseCase
CallbackUseCase CallbackUseCase
}
Click to show internal directories.
Click to hide internal directories.