mfa

package
v0.0.0-...-5a7d5b2 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Issuer - Miracl Trust OIDC server
	Issuer = "https://api.mpin.io"
)

Variables

This section is empty.

Functions

func WithDiscoveryURL

func WithDiscoveryURL(url string) func(*Client)

WithDiscoveryURL sets DiscoveryURL.

Types

type Client

type Client struct {
	OAuthConfig oauth2.Config
	Verifier    *oidc.IDTokenVerifier
	Provider    *oidc.Provider
	// contains filtered or unexported fields
}

Client is a client for that MFA service.

func New

func New(ctx context.Context, clientID, clientSecret, redirectURL string, opts ...func(*Client)) (*Client, error)

New returns new MFA client.

func (*Client) Issuer

func (c *Client) Issuer() string

Issuer returns the client's issuer.

func (*Client) Verify

func (c *Client) Verify(ctx context.Context, code string) (*oauth2.Token, error)

Verify verifies the IDToken.

Jump to

Keyboard shortcuts

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