auth

package
v0.0.0-...-89754d3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: MIT Imports: 10 Imported by: 0

README

Auth

服务认证

  • token有效性
  • service path/method调用授权认证
  • payload验签

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Token

func Token(ak, sk, path string) string

Types

type AccessKey

type AccessKey struct {
	AccessKeyId     string
	AccessKeySecret string
	Roles           []string
}

type Auth

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

func NewAuth

func NewAuth(adapter persist.Adapter, w persist.Watcher) *Auth

func (*Auth) Init

func (this *Auth) Init() error

func (*Auth) Verify

func (this *Auth) Verify(ctx context.Context, req *protocol.Message, token string) error

Jump to

Keyboard shortcuts

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