auth

package
v0.0.0-...-4ff501c Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(hashedPassword, password string) error

func Encrypt

func Encrypt(source string) (string, error)

func Sign

func Sign(secretID, secretKey, iss, aud string) string

Types

type Authz

type Authz struct {
	*casbin.SyncedEnforcer
}

func NewAuthz

func NewAuthz(db *gorm.DB) (*Authz, error)

func (*Authz) Authorize

func (a *Authz) Authorize(sub, obj, act string) (bool, error)

Jump to

Keyboard shortcuts

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