Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseECPublicKeyFromPEM ¶
ParseECPublicKeyFromPEM parse PEM encoded PKCS1 or PKCS8 public key
func ParseRSAPublicKeyFromPEM ¶
ParseRSAPublicKeyFromPEM parse PEM encoded PKCS1 or PKCS8 public key
Types ¶
type Config ¶
type Config struct { application.Auth Config *Rule `json:"config" label:"JWT配置"` Users []*User `json:"users" label:"用户列表"` }
type Rule ¶
type Rule struct { Iss string `json:"iss" label:"签发机构"` Algorithm string `json:"algorithm" label:"签名算法" enum:"HS256,HS384,HS512,RS256,RS384,RS512,ES256,ES384,ES512"` Secret string `json:"secret" label:"密钥" switch:"algorithm==='HS256'||algorithm==='HS384'||algorithm==='HS512'"` RsaPublicKey string `json:"rsa_public_key" label:"RSA公钥" switch:"algorithm!=='HS256'&&algorithm!=='HS384'&&algorithm!=='HS512'"` Path string `json:"path" label:"用户名JsonPath"` ClaimsToVerify []string `json:"claims_to_verify" label:"检验字段"` SignatureIsBase64 bool `` /* 131-byte string literal not displayed */ }
Click to show internal directories.
Click to hide internal directories.