local

package
v0.0.0-...-a97fee2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLocalAuthenticationMiddleware

func NewLocalAuthenticationMiddleware(store *storage.Store) func(http.Handler) http.Handler

NewLocalAuthenticationMiddleware stubs out context info for local (non-Okta) authentication

func NewLocalWebSocketAuthenticationMiddleware

func NewLocalWebSocketAuthenticationMiddleware(store *storage.Store) transport.WebsocketInitFunc

NewLocalWebSocketAuthenticationMiddleware returns a transport.WebsocketInitFunc that uses the `authToken` in the websocket connection payload to authenticate a local user.

func NewOktaAPIClient

func NewOktaAPIClient() (*client, error)

NewOktaAPIClient returns a mock Okta client

Types

type CedarMINTClient

type CedarMINTClient struct{}

CedarMINTClient mocks the CEDAR MINT client for local/test use

func NewCedarMINTClient

func NewCedarMINTClient() *CedarMINTClient

NewCedarMINTClient returns a fake CEDAR MINT Client

func (*CedarMINTClient) CheckConnection

func (c *CedarMINTClient) CheckConnection(context.Context) error

CheckConnection tries to verify if we are able to communicate with the CEDAR API

func (*CedarMINTClient) ValidateAndSubmitSystemIntake

func (c *CedarMINTClient) ValidateAndSubmitSystemIntake(ctx context.Context) (string, error)

ValidateAndSubmitSystemIntake submits a system intake to CEDAR

type DevUserConfig

type DevUserConfig struct {
	EUA      string   `json:"euaId"`
	JobCodes []string `json:"jobCodes"`
}

DevUserConfig is the set of values that can be passed in a request header

type Sender

type Sender struct {
}

Sender is a mock email sender for local environments

func NewSender

func NewSender() Sender

NewSender returns a fake email sender

func (Sender) Send

func (s Sender) Send(ctx context.Context, toAddress string, ccAddress string, subject string, body string) error

Send logs an email

Jump to

Keyboard shortcuts

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