kratos

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FakeSessionID = "fake-kratos-session-id"
	FakeUsername  = "fake-kratos-username"
	FakePassword  = "fake-kratos-password" // nolint: gosec
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	DisableSession(ctx context.Context, identityProviderSessionID string) error
	Authenticate(ctx context.Context, name, secret string) error
}

func New

func New(d dependencies) Client

type Default

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

func (*Default) Authenticate

func (k *Default) Authenticate(ctx context.Context, name, secret string) (err error)

func (*Default) DisableSession

func (k *Default) DisableSession(ctx context.Context, identityProviderSessionID string) (err error)

type FakeKratos

type FakeKratos struct {
	DisableSessionWasCalled bool
	LastDisabledSession     string
}

func NewFake

func NewFake() *FakeKratos

func (*FakeKratos) Authenticate

func (f *FakeKratos) Authenticate(_ context.Context, username, password string) error

func (*FakeKratos) DisableSession

func (f *FakeKratos) DisableSession(_ context.Context, identityProviderSessionID string) error

func (*FakeKratos) Reset

func (f *FakeKratos) Reset()

type Provider

type Provider interface {
	Kratos() Client
}

Jump to

Keyboard shortcuts

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