device

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const NOT_FOUND_ERROR_DESC = "The user_code provided is either invalid, expired or already used."

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

func NewAPI

func NewAPI(service ServiceInterface, tracer tracing.TracingInterface, logger logging.LoggerInterface) *API

func (*API) RegisterEndpoints

func (a *API) RegisterEndpoints(mux *chi.Mux)

type HydraClientInterface

type HydraClientInterface interface {
	OAuth2API() hydra.OAuth2API
}

type KratosClientInterface

type KratosClientInterface interface {
	FrontendApi() kClient.FrontendAPI
}

type Service

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

func (*Service) AcceptUserCode

func (s *Service) AcceptUserCode(ctx context.Context, deviceChallenge string, req *hydra.AcceptDeviceUserCodeRequest) (*hClient.OAuth2RedirectTo, error)

func (*Service) ParseUserCodeBody

func (s *Service) ParseUserCodeBody(r *http.Request) (*hydra.AcceptDeviceUserCodeRequest, error)

type ServiceInterface

type ServiceInterface interface {
	AcceptUserCode(context.Context, string, *hydra.AcceptDeviceUserCodeRequest) (*hClient.OAuth2RedirectTo, error)
	ParseUserCodeBody(*http.Request) (*hydra.AcceptDeviceUserCodeRequest, error)
}

Jump to

Keyboard shortcuts

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