hydra

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	FakeInvalidLoginChallenge = "2e98454e-031b-4870-9ad6-8517df1ce604"
	FakeValidLoginChallenge   = "5ff59a39-ecc5-467e-bb10-26644c0700ee"
	FakePostLoginURL          = "https://www.ory.sh/fake-post-login"
)

Variables

View Source
var ErrFakeAcceptLoginRequestFailed = errors.New("failed to accept login request")

Functions

func GetLoginChallengeID

func GetLoginChallengeID(conf *config.Config, r *http.Request) (sqlxx.NullString, error)

Types

type AcceptLoginRequestParams added in v1.1.0

type AcceptLoginRequestParams struct {
	LoginChallenge        string
	IdentityID            string
	SessionID             string
	AuthenticationMethods session.AuthenticationMethods
}

type DefaultHydra

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

func NewDefaultHydra

func NewDefaultHydra(d hydraDependencies) *DefaultHydra

func (*DefaultHydra) AcceptLoginRequest

func (h *DefaultHydra) AcceptLoginRequest(ctx context.Context, params AcceptLoginRequestParams) (string, error)

func (*DefaultHydra) GetLoginRequest

func (h *DefaultHydra) GetLoginRequest(ctx context.Context, loginChallenge string) (*hydraclientgo.OAuth2LoginRequest, error)

type FakeHydra

type FakeHydra struct {
	Skip       bool
	RequestURL string
}

func NewFake added in v1.0.0

func NewFake() *FakeHydra

func (*FakeHydra) AcceptLoginRequest

func (h *FakeHydra) AcceptLoginRequest(_ context.Context, params AcceptLoginRequestParams) (string, error)

func (*FakeHydra) GetLoginRequest

func (h *FakeHydra) GetLoginRequest(_ context.Context, loginChallenge string) (*hydraclientgo.OAuth2LoginRequest, error)

type Hydra

type Hydra interface {
	AcceptLoginRequest(ctx context.Context, params AcceptLoginRequestParams) (string, error)
	GetLoginRequest(ctx context.Context, loginChallenge string) (*hydraclientgo.OAuth2LoginRequest, error)
}

type Provider added in v1.0.0

type Provider interface {
	Hydra() Hydra
}

Jump to

Keyboard shortcuts

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