magic

package
v0.0.0-...-8cb3723 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Magic

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

Magic provides a magic service implementation

func NewMagic

func NewMagic(config *config.MagicConfig) *Magic

NewMagic creates a new magic service implementation

func (*Magic) GetIssuer

func (m *Magic) GetIssuer(tk *token.Token) (*magic.UserInfo, error)

GetIssuer retrieves the issuer from token func (m *Magic) GetIssuer(c *gin.Context) error

func (*Magic) IsValidToken

func (m *Magic) IsValidToken(tkn string) (*token.Token, error)

IsValidToken validates a token with magic link

type Service

type Service interface {
	IsValidToken(string) (*token.Token, error)
	GetIssuer(*token.Token) (*mag.UserInfo, error)
}

Service is the interface to our magic service

Jump to

Keyboard shortcuts

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