totp

package
v0.0.0-...-6e90d5c Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TOTP

type TOTP interface {
	// Generate generates new OTP secret
	Generate() string

	// GenerateURI generates uri from secret
	GenerateURI(secret string, user string) string

	// GenerateURIWithIssuer generates uri with issuer
	GenerateURIWithIssuer(secret string, user string, issuer string) string

	// Verify verifies password
	Verify(secret string, password string) bool
}

TOTP is a Time-based One-time Password service

func New

func New() TOTP

New creates new TOTP service

func NewWithIssuer

func NewWithIssuer(issuer string) TOTP

NewWithIssuer creates new TOTP service with default issuer

Jump to

Keyboard shortcuts

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