Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) Parse ¶
func (p *Parser) Parse( tokenStr string, getSigningMethod func(method string) (jwt.ISigningMethod, error), ) ( vdFunc func( vdHeader func(header map[string]any) error, vdCustomClaims func(jwt.IClaims) error, kf jwt.KeyFunc, ) error, err error, )
Parse 細節請參考 ParseWithClaims
func (*Parser) ParseWithClaims ¶
func (p *Parser) ParseWithClaims( tokenStr string, getSigningMethod func(method string) (jwt.ISigningMethod, error), iClaims jwt.IClaims, ) ( vdFunc func( vdHeader func(header map[string]any) error, vdCustomClaims func(jwt.IClaims) error, kf jwt.KeyFunc, ) error, err error, )
ParseWithClaims 其完成時,只是將傳入的jwt字串轉換成為jwt.Token對象 至於後面的驗證,需要自定義,請參考 Parser.validate
Click to show internal directories.
Click to hide internal directories.