login

package
v0.0.0-...-812a07f Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HUB_AUTH_HOST = "https://localhost:8070"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MockWallet

type MockWallet struct {
	ReceivedCallback bool
	UserData         *UserClaims
	CallbackErr      error
	Secret           string
	// contains filtered or unexported fields
}

func NewMockWallet

func NewMockWallet(clientRegistrationURL, oidcProviderURL string, httpClient *http.Client) (*MockWallet, error)

func (*MockWallet) CreateAndPushSecretToHubAuth

func (m *MockWallet) CreateAndPushSecretToHubAuth(endpoint string) error

func (*MockWallet) FetchBootstrapData

func (m *MockWallet) FetchBootstrapData(endpoint string) (*operation.BootstrapData, error)

func (*MockWallet) RequestUserAuthentication

func (m *MockWallet) RequestUserAuthentication() (*http.Response, error)

func (*MockWallet) ServeHTTP

func (m *MockWallet) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*MockWallet) UpdateBootstrapData

func (m *MockWallet) UpdateBootstrapData(endpoint string, update *operation.UpdateBootstrapDataRequest) error

type Steps

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

func NewSteps

func NewSteps(ctx *bddctx.BDDContext) *Steps

func (*Steps) NewWalletLogin

func (s *Steps) NewWalletLogin() (*MockWallet, error)

NewWalletLogin returns a new common.MockWallet that is logged in.

func (*Steps) RegisterSteps

func (s *Steps) RegisterSteps(gs *godog.Suite)

type UserClaims

type UserClaims struct {
	Sub        string `json:"sub"`
	Name       string `json:"name"`
	GivenName  string `json:"given_name"`
	FamilyName string `json:"family_name"`
	Email      string `json:"email"`
}

BDD tests can configure

Jump to

Keyboard shortcuts

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