auth

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New added in v1.3.0

func New(authServer string) *handler

Types

type ExchangeRequest

type ExchangeRequest struct {
	CodeVerifier string `json:"code_verifier"`
	AccessCode   string `json:"access_code"`
	RedirectURI  string `json:"redirect_uri"`
}

type ExchangeResponse

type ExchangeResponse struct {
	Token   *oauth2.Token `json:"token"`
	IDToken string        `json:"id_token"`
}

type Handler added in v1.3.0

type Handler interface {
	GetDeviceAgentToken(ctx context.Context, log logrus.FieldLogger, oauthConfig oauth2.Config) (*Tokens, error)
}

type MockHandler added in v1.3.0

type MockHandler struct {
	mock.Mock
}

MockHandler is an autogenerated mock type for the Handler type

func NewMockHandler added in v1.3.0

func NewMockHandler(t interface {
	mock.TestingT
	Cleanup(func())
},
) *MockHandler

NewMockHandler creates a new instance of MockHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockHandler) EXPECT added in v1.3.0

func (_m *MockHandler) EXPECT() *MockHandler_Expecter

func (*MockHandler) GetDeviceAgentToken added in v1.3.0

func (_mock *MockHandler) GetDeviceAgentToken(ctx context.Context, log logrus.FieldLogger, oauthConfig oauth2.Config) (*Tokens, error)

GetDeviceAgentToken provides a mock function for the type MockHandler

type MockHandler_Expecter added in v1.3.0

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

func (*MockHandler_Expecter) GetDeviceAgentToken added in v1.3.0

func (_e *MockHandler_Expecter) GetDeviceAgentToken(ctx interface{}, log interface{}, oauthConfig interface{}) *MockHandler_GetDeviceAgentToken_Call

GetDeviceAgentToken is a helper method to define mock.On call

  • ctx context.Context
  • log logrus.FieldLogger
  • oauthConfig oauth2.Config

type MockHandler_GetDeviceAgentToken_Call added in v1.3.0

type MockHandler_GetDeviceAgentToken_Call struct {
	*mock.Call
}

MockHandler_GetDeviceAgentToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDeviceAgentToken'

func (*MockHandler_GetDeviceAgentToken_Call) Return added in v1.3.0

func (*MockHandler_GetDeviceAgentToken_Call) Run added in v1.3.0

func (*MockHandler_GetDeviceAgentToken_Call) RunAndReturn added in v1.3.0

type Tokens

type Tokens struct {
	Token   *oauth2.Token
	IDToken string
}

Jump to

Keyboard shortcuts

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