jwt

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JWT

type JWT struct {
	jwt.RegisteredClaims
	Name     *string      `json:"name,omitempty"`
	Email    *string      `json:"email,omitempty"`
	Phone    *string      `json:"phone,omitempty"`
	Metadata *interface{} `json:"metadata,omitempty"`
	Provider string       `json:"provider"`
	// contains filtered or unexported fields
}

func Decode

func Decode(signed_string string, config *config.Config) (*JWT, error)

func New

func New(provider string, user *model.User, metadata *interface{}, config *config.Config) *JWT

func (*JWT) HasAdminRole added in v0.5.0

func (j *JWT) HasAdminRole() bool

func (*JWT) HasReadRole added in v0.7.0

func (j *JWT) HasReadRole() bool

func (*JWT) Sign

func (j *JWT) Sign() (string, error)

Jump to

Keyboard shortcuts

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