Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrLoadPublicKey = errors.New("couldn't read public key")
ErrLoadPublicKey 公钥无法阅读
View Source
var ErrUnexpectedAlgo = errors.New("unexpected algo type")
ErrUnexpectedAlgo 算法不符
View Source
var ErrVerifyToken = errors.New("Verify Token error")
ErrVerifyToken 校验token错误
Functions ¶
This section is empty.
Types ¶
type Asymmetric ¶
type Asymmetric struct {
// contains filtered or unexported fields
}
Asymmetric 非对称加密jwt的验证器
func AsymmetricFromPEM ¶
func AsymmetricFromPEM(method string, keybytes []byte) (*Asymmetric, error)
AsymmetricFromPEM 使用PEM编码的密钥字节串创建一个非对称加密的jwt验证器对象
func AsymmetricFromPEMFile ¶
func AsymmetricFromPEMFile(method string, keyPath string) (*Asymmetric, error)
AsymmetricFromPEMFile 从路径上读取密钥文件创建一个Verifier对象
Click to show internal directories.
Click to hide internal directories.