totp

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: 33 Imported by: 0

Documentation

Index

Constants

View Source
const InternalContextKeyURL = "url"

Variables

This section is empty.

Functions

func KeyToHTMLImage

func KeyToHTMLImage(key *otp.Key) (string, error)

func NewKey

func NewKey(ctx context.Context, accountName string, d interface {
	config.Provider
}) (*otp.Key, error)

func NewTOTPImageQRNode

func NewTOTPImageQRNode(key *otp.Key) (*node.Node, error)

func NewTOTPSourceURLNode

func NewTOTPSourceURLNode(key *otp.Key) *node.Node

func NewUnlinkTOTPNode

func NewUnlinkTOTPNode() *node.Node

func NewVerifyTOTPNode

func NewVerifyTOTPNode() *node.Node

Types

type SchemaExtension

type SchemaExtension struct {
	AccountName string
	// contains filtered or unexported fields
}

func NewSchemaExtension

func NewSchemaExtension(fallback string) *SchemaExtension

func (*SchemaExtension) Finish

func (r *SchemaExtension) Finish() error

func (*SchemaExtension) Run

func (r *SchemaExtension) Run(_ jsonschema.ValidationContext, s schema.ExtensionConfig, value interface{}) error

type Strategy

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

func NewStrategy

func NewStrategy(d any) *Strategy

func (*Strategy) CompletedAuthenticationMethod

func (s *Strategy) CompletedAuthenticationMethod(ctx context.Context, _ session.AuthenticationMethods) session.AuthenticationMethod

func (*Strategy) CountActiveFirstFactorCredentials

func (s *Strategy) CountActiveFirstFactorCredentials(cc map[identity.CredentialsType]identity.Credentials) (count int, err error)

func (*Strategy) CountActiveMultiFactorCredentials

func (s *Strategy) CountActiveMultiFactorCredentials(cc map[identity.CredentialsType]identity.Credentials) (count int, err error)

func (*Strategy) ID

func (*Strategy) Login

func (s *Strategy) Login(w http.ResponseWriter, r *http.Request, f *login.Flow, sess *session.Session) (i *identity.Identity, err error)

func (*Strategy) NodeGroup

func (s *Strategy) NodeGroup() node.UiNodeGroup

func (*Strategy) PopulateLoginMethod

func (s *Strategy) PopulateLoginMethod(r *http.Request, requestedAAL identity.AuthenticatorAssuranceLevel, sr *login.Flow) error

func (*Strategy) PopulateSettingsMethod

func (s *Strategy) PopulateSettingsMethod(r *http.Request, id *identity.Identity, f *settings.Flow) error

func (*Strategy) RegisterLoginRoutes

func (s *Strategy) RegisterLoginRoutes(r *x.RouterPublic)

func (*Strategy) RegisterSettingsRoutes

func (s *Strategy) RegisterSettingsRoutes(_ *x.RouterPublic)

func (*Strategy) Settings

func (*Strategy) SettingsStrategyID

func (s *Strategy) SettingsStrategyID() string

Jump to

Keyboard shortcuts

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