Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertFromBase64 ¶
func CertFromBase64(base64Cert string) ([]*x509.Certificate, error)
CertFromBase64 loads a .X509 certificate from base64Cert and returns an *x509.Certificate
Types ¶
type JWTSignData ¶
type JWTSignData struct {
Raw string // Raw contains the raw token. Populated when you [Parse] a token
Method jwt.SigningMethod // Method is the signing method used or to be used
Header map[string]interface{} // Header is the first segment of the token in decoded form
Payload interface{} // Payload is the second segment of the Payload in decoded form
Signature []byte // Signature is the third segment of the token in decoded form. Populated when you Parse a token
Valid bool
}
type SignedDataVerifier ¶
type SignedDataVerifier struct {
// contains filtered or unexported fields
}
func NewParser ¶
func NewParser(rootCertificates []*x509.Certificate) *SignedDataVerifier
func NewParserWithDefault ¶
func NewParserWithDefault() *SignedDataVerifier
func (*SignedDataVerifier) Parse ¶
func (p *SignedDataVerifier) Parse(tokenString string, payload interface{}) (*JWTSignData, error)
Click to show internal directories.
Click to hide internal directories.