certificateprovider

package
v0.0.0-...-897bb11 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfirmYourDetails

func ConfirmYourDetails(tmpl template.Template, donorStore DonorStore, certificateProviderStore CertificateProviderStore) page.Handler

func EnterDateOfBirth

func EnterDateOfBirth(tmpl template.Template, donorStore DonorStore, certificateProviderStore CertificateProviderStore) page.Handler

func EnterReferenceNumber

func EnterReferenceNumber(tmpl template.Template, shareCodeStore ShareCodeStore, sessionStore sessions.Store, certificateProviderStore CertificateProviderStore) page.Handler

func Guidance

func Guidance(tmpl template.Template, donorStore DonorStore, certificateProviderStore CertificateProviderStore) page.Handler

func IdentityWithOneLogin

func IdentityWithOneLogin(logger Logger, oneLoginClient OneLoginClient, store sesh.Store, randomString func(int) string) page.Handler

func IdentityWithOneLoginCallback

func IdentityWithOneLoginCallback(tmpl template.Template, oneLoginClient OneLoginClient, sessionStore sesh.Store, certificateProviderStore CertificateProviderStore) page.Handler

func IdentityWithTodo

func IdentityWithTodo(tmpl template.Template, now func() time.Time, identityOption identity.Option, certificateProviderStore CertificateProviderStore) page.Handler

func IdentityWithYoti

func IdentityWithYoti(tmpl template.Template, sessionStore SessionStore, yotiClient YotiClient, certificateProviderStore CertificateProviderStore) page.Handler

func IdentityWithYotiCallback

func IdentityWithYotiCallback(tmpl template.Template, yotiClient YotiClient, certificateProviderStore CertificateProviderStore) page.Handler

func ProvideCertificate

func ProvideCertificate(tmpl template.Template, donorStore DonorStore, now func() time.Time, certificateProviderStore CertificateProviderStore) page.Handler

func ReadTheLpa

func ReadTheLpa(tmpl template.Template, donorStore DonorStore, certificateProviderStore CertificateProviderStore) page.Handler

func Register

func Register(
	rootMux *http.ServeMux,
	logger Logger,
	tmpls template.Templates,
	sessionStore SessionStore,
	donorStore DonorStore,
	oneLoginClient OneLoginClient,
	shareCodeStore ShareCodeStore,
	errorHandler page.ErrorHandler,
	yotiClient YotiClient,
	certificateProviderStore CertificateProviderStore,
	notFoundHandler page.Handler,
)

func SelectYourIdentityOptions

func SelectYourIdentityOptions(tmpl template.Template, pageIndex int, certificateProviderStore CertificateProviderStore) page.Handler

func TaskList

func TaskList(tmpl template.Template, donorStore DonorStore, certificateProviderStore CertificateProviderStore) page.Handler

func WhoIsEligible

func WhoIsEligible(tmpl template.Template, donorStore DonorStore) page.Handler

func YourChosenIdentityOptions

func YourChosenIdentityOptions(tmpl template.Template, certificateProviderStore CertificateProviderStore) page.Handler

Types

type DonorStore

type DonorStore interface {
	GetAny(context.Context) (*page.Lpa, error)
}

type Logger

type Logger interface {
	Print(v ...interface{})
}

type NotifyClient

type NotifyClient interface {
	Email(ctx context.Context, email notify.Email) (string, error)
	Sms(ctx context.Context, sms notify.Sms) (string, error)
	TemplateID(id notify.Template) string
}

type OneLoginClient

type OneLoginClient interface {
	AuthCodeURL(state, nonce, locale string, identity bool) string
	Exchange(ctx context.Context, code, nonce string) (idToken, accessToken string, err error)
	UserInfo(ctx context.Context, accessToken string) (onelogin.UserInfo, error)
	ParseIdentityClaim(ctx context.Context, userInfo onelogin.UserInfo) (identity.UserData, error)
}

type SessionStore

type SessionStore interface {
	Get(r *http.Request, name string) (*sessions.Session, error)
	New(r *http.Request, name string) (*sessions.Session, error)
	Save(r *http.Request, w http.ResponseWriter, s *sessions.Session) error
}

type Template

type Template func(io.Writer, interface{}) error

type YotiClient

type YotiClient interface {
	IsTest() bool
	SdkID() string
	ScenarioID() string
	User(string) (identity.UserData, error)
}

Jump to

Keyboard shortcuts

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