Documentation ¶
Index ¶
- type FakeClient
- func (f *FakeClient) Authenticate(ctx context.Context, r *authn.Request) (*authn.Identity, error)
- func (f *FakeClient) Name() string
- func (f *FakeClient) Priority() uint
- func (f *FakeClient) Test(ctx context.Context, r *authn.Request) bool
- func (f *FakeClient) UsageStatFn(ctx context.Context) (map[string]interface{}, error)
- type FakePasswordClient
- type FakeRedirectClient
- func (f FakeRedirectClient) Authenticate(ctx context.Context, r *authn.Request) (*authn.Identity, error)
- func (f FakeRedirectClient) Name() string
- func (f FakeRedirectClient) RedirectURL(ctx context.Context, r *authn.Request) (*authn.Redirect, error)
- func (f FakeRedirectClient) Test(ctx context.Context, r *authn.Request) bool
- type FakeService
- func (f FakeService) Authenticate(ctx context.Context, r *authn.Request) (*authn.Identity, error)
- func (f FakeService) Login(ctx context.Context, client string, r *authn.Request) (*authn.Identity, error)
- func (f FakeService) RedirectURL(ctx context.Context, client string, r *authn.Request) (*authn.Redirect, error)
- func (f FakeService) RegisterClient(c authn.Client)
- func (f FakeService) RegisterPostAuthHook(hook authn.PostAuthHookFn, priority uint)
- func (f FakeService) RegisterPostLoginHook(hook authn.PostLoginHookFn, priority uint)
- type MockClient
- func (m MockClient) Authenticate(ctx context.Context, r *authn.Request) (*authn.Identity, error)
- func (m MockClient) Hook(ctx context.Context, identity *authn.Identity, r *authn.Request) error
- func (m MockClient) Name() string
- func (m MockClient) Priority() uint
- func (m MockClient) Test(ctx context.Context, r *authn.Request) bool
- type MockProxyClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeClient ¶
type FakeClient struct { ExpectedName string ExpectedErr error ExpectedTest bool ExpectedPriority uint ExpectedIdentity *authn.Identity ExpectedStats map[string]interface{} }
func (*FakeClient) Authenticate ¶
func (*FakeClient) Name ¶
func (f *FakeClient) Name() string
func (*FakeClient) Priority ¶
func (f *FakeClient) Priority() uint
func (*FakeClient) UsageStatFn ¶
func (f *FakeClient) UsageStatFn(ctx context.Context) (map[string]interface{}, error)
type FakePasswordClient ¶
type FakeRedirectClient ¶
type FakeRedirectClient struct { ExpectedErr error ExpectedURL string ExpectedName string ExpectedOK bool ExpectedRedirect *authn.Redirect ExpectedIdentity *authn.Identity }
func (FakeRedirectClient) Authenticate ¶
func (FakeRedirectClient) Name ¶
func (f FakeRedirectClient) Name() string
func (FakeRedirectClient) RedirectURL ¶
type FakeService ¶
type FakeService struct { ExpectedErr error ExpectedRedirect *authn.Redirect ExpectedIdentity *authn.Identity }
func (FakeService) Authenticate ¶
func (FakeService) RedirectURL ¶
func (FakeService) RegisterClient ¶
func (f FakeService) RegisterClient(c authn.Client)
func (FakeService) RegisterPostAuthHook ¶
func (f FakeService) RegisterPostAuthHook(hook authn.PostAuthHookFn, priority uint)
func (FakeService) RegisterPostLoginHook ¶
func (f FakeService) RegisterPostLoginHook(hook authn.PostLoginHookFn, priority uint)
type MockClient ¶
type MockClient struct { NameFunc func() string AuthenticateFunc func(ctx context.Context, r *authn.Request) (*authn.Identity, error) TestFunc func(ctx context.Context, r *authn.Request) bool PriorityFunc func() uint HookFunc func(ctx context.Context, identity *authn.Identity, r *authn.Request) error }
func (MockClient) Authenticate ¶
func (MockClient) Name ¶
func (m MockClient) Name() string
func (MockClient) Priority ¶
func (m MockClient) Priority() uint
Click to show internal directories.
Click to hide internal directories.