Documentation ¶
Overview ¶
Package client provides a client of OpenID Connect.
Index ¶
- Variables
- type AuthCodeURLInput
- type ExchangeAuthCodeInput
- type Factory
- type FactoryInterface
- type GetTokenByAuthCodeInput
- type Interface
- type MockFactoryInterface
- type MockFactoryInterface_Expecter
- type MockFactoryInterface_New_Call
- type MockInterface
- func (_m *MockInterface) EXPECT() *MockInterface_Expecter
- func (_m *MockInterface) ExchangeAuthCode(ctx context.Context, in ExchangeAuthCodeInput) (*oidc.TokenSet, error)
- func (_m *MockInterface) ExchangeDeviceCode(ctx context.Context, authResponse *oauth2dev.AuthorizationResponse) (*oidc.TokenSet, error)
- func (_m *MockInterface) GetAuthCodeURL(in AuthCodeURLInput) string
- func (_m *MockInterface) GetDeviceAuthorization(ctx context.Context) (*oauth2dev.AuthorizationResponse, error)
- func (_m *MockInterface) GetTokenByAuthCode(ctx context.Context, in GetTokenByAuthCodeInput, ...) (*oidc.TokenSet, error)
- func (_m *MockInterface) GetTokenByROPC(ctx context.Context, username string, password string) (*oidc.TokenSet, error)
- func (_m *MockInterface) Refresh(ctx context.Context, refreshToken string) (*oidc.TokenSet, error)
- func (_m *MockInterface) SupportedPKCEMethods() []string
- type MockInterface_ExchangeAuthCode_Call
- type MockInterface_ExchangeDeviceCode_Call
- type MockInterface_Expecter
- func (_e *MockInterface_Expecter) ExchangeAuthCode(ctx interface{}, in interface{}) *MockInterface_ExchangeAuthCode_Call
- func (_e *MockInterface_Expecter) ExchangeDeviceCode(ctx interface{}, authResponse interface{}) *MockInterface_ExchangeDeviceCode_Call
- func (_e *MockInterface_Expecter) GetAuthCodeURL(in interface{}) *MockInterface_GetAuthCodeURL_Call
- func (_e *MockInterface_Expecter) GetDeviceAuthorization(ctx interface{}) *MockInterface_GetDeviceAuthorization_Call
- func (_e *MockInterface_Expecter) GetTokenByAuthCode(ctx interface{}, in interface{}, localServerReadyChan interface{}) *MockInterface_GetTokenByAuthCode_Call
- func (_e *MockInterface_Expecter) GetTokenByROPC(ctx interface{}, username interface{}, password interface{}) *MockInterface_GetTokenByROPC_Call
- func (_e *MockInterface_Expecter) Refresh(ctx interface{}, refreshToken interface{}) *MockInterface_Refresh_Call
- func (_e *MockInterface_Expecter) SupportedPKCEMethods() *MockInterface_SupportedPKCEMethods_Call
- type MockInterface_GetAuthCodeURL_Call
- type MockInterface_GetDeviceAuthorization_Call
- type MockInterface_GetTokenByAuthCode_Call
- type MockInterface_GetTokenByROPC_Call
- type MockInterface_Refresh_Call
- type MockInterface_SupportedPKCEMethods_Call
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AuthCodeURLInput ¶
type ExchangeAuthCodeInput ¶
type FactoryInterface ¶
type GetTokenByAuthCodeInput ¶
type Interface ¶
type Interface interface { GetAuthCodeURL(in AuthCodeURLInput) string ExchangeAuthCode(ctx context.Context, in ExchangeAuthCodeInput) (*oidc.TokenSet, error) GetTokenByAuthCode(ctx context.Context, in GetTokenByAuthCodeInput, localServerReadyChan chan<- string) (*oidc.TokenSet, error) GetTokenByROPC(ctx context.Context, username, password string) (*oidc.TokenSet, error) GetDeviceAuthorization(ctx context.Context) (*oauth2dev.AuthorizationResponse, error) ExchangeDeviceCode(ctx context.Context, authResponse *oauth2dev.AuthorizationResponse) (*oidc.TokenSet, error) Refresh(ctx context.Context, refreshToken string) (*oidc.TokenSet, error) SupportedPKCEMethods() []string }
type MockFactoryInterface ¶ added in v1.25.2
MockFactoryInterface is an autogenerated mock type for the FactoryInterface type
func NewMockFactoryInterface ¶ added in v1.25.2
func NewMockFactoryInterface(t mockConstructorTestingTNewMockFactoryInterface) *MockFactoryInterface
NewMockFactoryInterface creates a new instance of MockFactoryInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockFactoryInterface) EXPECT ¶ added in v1.25.2
func (_m *MockFactoryInterface) EXPECT() *MockFactoryInterface_Expecter
type MockFactoryInterface_Expecter ¶ added in v1.25.2
type MockFactoryInterface_Expecter struct {
// contains filtered or unexported fields
}
func (*MockFactoryInterface_Expecter) New ¶ added in v1.25.2
func (_e *MockFactoryInterface_Expecter) New(ctx interface{}, p interface{}, tlsClientConfig interface{}) *MockFactoryInterface_New_Call
New is a helper method to define mock.On call
- ctx context.Context
- p oidc.Provider
- tlsClientConfig tlsclientconfig.Config
type MockFactoryInterface_New_Call ¶ added in v1.25.2
MockFactoryInterface_New_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'New'
func (*MockFactoryInterface_New_Call) Return ¶ added in v1.25.2
func (_c *MockFactoryInterface_New_Call) Return(_a0 Interface, _a1 error) *MockFactoryInterface_New_Call
func (*MockFactoryInterface_New_Call) Run ¶ added in v1.25.2
func (_c *MockFactoryInterface_New_Call) Run(run func(ctx context.Context, p oidc.Provider, tlsClientConfig tlsclientconfig.Config)) *MockFactoryInterface_New_Call
type MockInterface ¶ added in v1.25.2
MockInterface is an autogenerated mock type for the Interface type
func NewMockInterface ¶ added in v1.25.2
func NewMockInterface(t mockConstructorTestingTNewMockInterface) *MockInterface
NewMockInterface creates a new instance of MockInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockInterface) EXPECT ¶ added in v1.25.2
func (_m *MockInterface) EXPECT() *MockInterface_Expecter
func (*MockInterface) ExchangeAuthCode ¶ added in v1.25.2
func (_m *MockInterface) ExchangeAuthCode(ctx context.Context, in ExchangeAuthCodeInput) (*oidc.TokenSet, error)
ExchangeAuthCode provides a mock function with given fields: ctx, in
func (*MockInterface) ExchangeDeviceCode ¶ added in v1.26.0
func (_m *MockInterface) ExchangeDeviceCode(ctx context.Context, authResponse *oauth2dev.AuthorizationResponse) (*oidc.TokenSet, error)
ExchangeDeviceCode provides a mock function with given fields: ctx, authResponse
func (*MockInterface) GetAuthCodeURL ¶ added in v1.25.2
func (_m *MockInterface) GetAuthCodeURL(in AuthCodeURLInput) string
GetAuthCodeURL provides a mock function with given fields: in
func (*MockInterface) GetDeviceAuthorization ¶ added in v1.26.0
func (_m *MockInterface) GetDeviceAuthorization(ctx context.Context) (*oauth2dev.AuthorizationResponse, error)
GetDeviceAuthorization provides a mock function with given fields: ctx
func (*MockInterface) GetTokenByAuthCode ¶ added in v1.25.2
func (_m *MockInterface) GetTokenByAuthCode(ctx context.Context, in GetTokenByAuthCodeInput, localServerReadyChan chan<- string) (*oidc.TokenSet, error)
GetTokenByAuthCode provides a mock function with given fields: ctx, in, localServerReadyChan
func (*MockInterface) GetTokenByROPC ¶ added in v1.25.2
func (_m *MockInterface) GetTokenByROPC(ctx context.Context, username string, password string) (*oidc.TokenSet, error)
GetTokenByROPC provides a mock function with given fields: ctx, username, password
func (*MockInterface) Refresh ¶ added in v1.25.2
Refresh provides a mock function with given fields: ctx, refreshToken
func (*MockInterface) SupportedPKCEMethods ¶ added in v1.25.2
func (_m *MockInterface) SupportedPKCEMethods() []string
SupportedPKCEMethods provides a mock function with given fields:
type MockInterface_ExchangeAuthCode_Call ¶ added in v1.25.2
MockInterface_ExchangeAuthCode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExchangeAuthCode'
func (*MockInterface_ExchangeAuthCode_Call) Return ¶ added in v1.25.2
func (_c *MockInterface_ExchangeAuthCode_Call) Return(_a0 *oidc.TokenSet, _a1 error) *MockInterface_ExchangeAuthCode_Call
func (*MockInterface_ExchangeAuthCode_Call) Run ¶ added in v1.25.2
func (_c *MockInterface_ExchangeAuthCode_Call) Run(run func(ctx context.Context, in ExchangeAuthCodeInput)) *MockInterface_ExchangeAuthCode_Call
type MockInterface_ExchangeDeviceCode_Call ¶ added in v1.26.0
MockInterface_ExchangeDeviceCode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExchangeDeviceCode'
func (*MockInterface_ExchangeDeviceCode_Call) Return ¶ added in v1.26.0
func (_c *MockInterface_ExchangeDeviceCode_Call) Return(_a0 *oidc.TokenSet, _a1 error) *MockInterface_ExchangeDeviceCode_Call
func (*MockInterface_ExchangeDeviceCode_Call) Run ¶ added in v1.26.0
func (_c *MockInterface_ExchangeDeviceCode_Call) Run(run func(ctx context.Context, authResponse *oauth2dev.AuthorizationResponse)) *MockInterface_ExchangeDeviceCode_Call
type MockInterface_Expecter ¶ added in v1.25.2
type MockInterface_Expecter struct {
// contains filtered or unexported fields
}
func (*MockInterface_Expecter) ExchangeAuthCode ¶ added in v1.25.2
func (_e *MockInterface_Expecter) ExchangeAuthCode(ctx interface{}, in interface{}) *MockInterface_ExchangeAuthCode_Call
ExchangeAuthCode is a helper method to define mock.On call
- ctx context.Context
- in ExchangeAuthCodeInput
func (*MockInterface_Expecter) ExchangeDeviceCode ¶ added in v1.26.0
func (_e *MockInterface_Expecter) ExchangeDeviceCode(ctx interface{}, authResponse interface{}) *MockInterface_ExchangeDeviceCode_Call
ExchangeDeviceCode is a helper method to define mock.On call
- ctx context.Context
- authResponse *oauth2dev.AuthorizationResponse
func (*MockInterface_Expecter) GetAuthCodeURL ¶ added in v1.25.2
func (_e *MockInterface_Expecter) GetAuthCodeURL(in interface{}) *MockInterface_GetAuthCodeURL_Call
GetAuthCodeURL is a helper method to define mock.On call
- in AuthCodeURLInput
func (*MockInterface_Expecter) GetDeviceAuthorization ¶ added in v1.26.0
func (_e *MockInterface_Expecter) GetDeviceAuthorization(ctx interface{}) *MockInterface_GetDeviceAuthorization_Call
GetDeviceAuthorization is a helper method to define mock.On call
- ctx context.Context
func (*MockInterface_Expecter) GetTokenByAuthCode ¶ added in v1.25.2
func (_e *MockInterface_Expecter) GetTokenByAuthCode(ctx interface{}, in interface{}, localServerReadyChan interface{}) *MockInterface_GetTokenByAuthCode_Call
GetTokenByAuthCode is a helper method to define mock.On call
- ctx context.Context
- in GetTokenByAuthCodeInput
- localServerReadyChan chan<- string
func (*MockInterface_Expecter) GetTokenByROPC ¶ added in v1.25.2
func (_e *MockInterface_Expecter) GetTokenByROPC(ctx interface{}, username interface{}, password interface{}) *MockInterface_GetTokenByROPC_Call
GetTokenByROPC is a helper method to define mock.On call
- ctx context.Context
- username string
- password string
func (*MockInterface_Expecter) Refresh ¶ added in v1.25.2
func (_e *MockInterface_Expecter) Refresh(ctx interface{}, refreshToken interface{}) *MockInterface_Refresh_Call
Refresh is a helper method to define mock.On call
- ctx context.Context
- refreshToken string
func (*MockInterface_Expecter) SupportedPKCEMethods ¶ added in v1.25.2
func (_e *MockInterface_Expecter) SupportedPKCEMethods() *MockInterface_SupportedPKCEMethods_Call
SupportedPKCEMethods is a helper method to define mock.On call
type MockInterface_GetAuthCodeURL_Call ¶ added in v1.25.2
MockInterface_GetAuthCodeURL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAuthCodeURL'
func (*MockInterface_GetAuthCodeURL_Call) Return ¶ added in v1.25.2
func (_c *MockInterface_GetAuthCodeURL_Call) Return(_a0 string) *MockInterface_GetAuthCodeURL_Call
func (*MockInterface_GetAuthCodeURL_Call) Run ¶ added in v1.25.2
func (_c *MockInterface_GetAuthCodeURL_Call) Run(run func(in AuthCodeURLInput)) *MockInterface_GetAuthCodeURL_Call
type MockInterface_GetDeviceAuthorization_Call ¶ added in v1.26.0
MockInterface_GetDeviceAuthorization_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDeviceAuthorization'
func (*MockInterface_GetDeviceAuthorization_Call) Return ¶ added in v1.26.0
func (_c *MockInterface_GetDeviceAuthorization_Call) Return(_a0 *oauth2dev.AuthorizationResponse, _a1 error) *MockInterface_GetDeviceAuthorization_Call
func (*MockInterface_GetDeviceAuthorization_Call) Run ¶ added in v1.26.0
func (_c *MockInterface_GetDeviceAuthorization_Call) Run(run func(ctx context.Context)) *MockInterface_GetDeviceAuthorization_Call
type MockInterface_GetTokenByAuthCode_Call ¶ added in v1.25.2
MockInterface_GetTokenByAuthCode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTokenByAuthCode'
func (*MockInterface_GetTokenByAuthCode_Call) Return ¶ added in v1.25.2
func (_c *MockInterface_GetTokenByAuthCode_Call) Return(_a0 *oidc.TokenSet, _a1 error) *MockInterface_GetTokenByAuthCode_Call
func (*MockInterface_GetTokenByAuthCode_Call) Run ¶ added in v1.25.2
func (_c *MockInterface_GetTokenByAuthCode_Call) Run(run func(ctx context.Context, in GetTokenByAuthCodeInput, localServerReadyChan chan<- string)) *MockInterface_GetTokenByAuthCode_Call
type MockInterface_GetTokenByROPC_Call ¶ added in v1.25.2
MockInterface_GetTokenByROPC_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTokenByROPC'
func (*MockInterface_GetTokenByROPC_Call) Return ¶ added in v1.25.2
func (_c *MockInterface_GetTokenByROPC_Call) Return(_a0 *oidc.TokenSet, _a1 error) *MockInterface_GetTokenByROPC_Call
func (*MockInterface_GetTokenByROPC_Call) Run ¶ added in v1.25.2
func (_c *MockInterface_GetTokenByROPC_Call) Run(run func(ctx context.Context, username string, password string)) *MockInterface_GetTokenByROPC_Call
type MockInterface_Refresh_Call ¶ added in v1.25.2
MockInterface_Refresh_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Refresh'
func (*MockInterface_Refresh_Call) Return ¶ added in v1.25.2
func (_c *MockInterface_Refresh_Call) Return(_a0 *oidc.TokenSet, _a1 error) *MockInterface_Refresh_Call
func (*MockInterface_Refresh_Call) Run ¶ added in v1.25.2
func (_c *MockInterface_Refresh_Call) Run(run func(ctx context.Context, refreshToken string)) *MockInterface_Refresh_Call
type MockInterface_SupportedPKCEMethods_Call ¶ added in v1.25.2
MockInterface_SupportedPKCEMethods_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SupportedPKCEMethods'
func (*MockInterface_SupportedPKCEMethods_Call) Return ¶ added in v1.25.2
func (_c *MockInterface_SupportedPKCEMethods_Call) Return(_a0 []string) *MockInterface_SupportedPKCEMethods_Call
func (*MockInterface_SupportedPKCEMethods_Call) Run ¶ added in v1.25.2
func (_c *MockInterface_SupportedPKCEMethods_Call) Run(run func()) *MockInterface_SupportedPKCEMethods_Call