secure

package
v0.0.0-...-69e7fd1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessClaims

type AccessClaims struct {
	jwt.RegisteredClaims
	UserName  string `json:"name"`
	UserEmail string `json:"email"`
	UserRole  string `json:"role"`
}

type Secure

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

func NewSecure

func NewSecure(repo repository) *Secure

func (*Secure) NewAccessToken

func (s *Secure) NewAccessToken(ctx context.Context, user *entity.User, client *entity.Client) (*entity.Token, error)

func (*Secure) NewCodeToken

func (s *Secure) NewCodeToken(ctx context.Context, user *entity.User, client *entity.Client) (*entity.Token, error)

func (*Secure) NewRefreshToken

func (s *Secure) NewRefreshToken(ctx context.Context, user *entity.User, client *entity.Client, ip, agent string) (*entity.Token, error)

func (*Secure) NewResetPassword

func (s *Secure) NewResetPassword(ctx context.Context, user *entity.User, client *entity.Client, ip, agent string) (*entity.Token, error)

Jump to

Keyboard shortcuts

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