Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Header ¶
type Header struct { Algorithm string `json:"alg"` // Represents the token type. Typ string `json:"typ"` // The optional hint of which key is being used. KeyID string `json:"kid,omitempty"` // contains filtered or unexported fields }
Header is header of jwt
type JWS ¶
type JWS struct {
// contains filtered or unexported fields
}
JWS provides a golang implementation of JSON Web Signature encoding and decoding. See RFC 7515.
func (*JWS) EncodeWith ¶
EncodeWith return token by the jws header and payload
type Payload ¶
type Payload struct { Iss string `json:"iss"` // email address of the client_id of the application making the access token request Scope string `json:"scope,omitempty"` // space-delimited list of the permissions the application requests Aud string `json:"aud,omitempty"` // descriptor of the intended target of the assertion (Optional). Exp int64 `json:"exp"` // the expiration time of the assertion (seconds since Unix epoch) Iat int64 `json:"iat"` // the time the assertion was issued (seconds since Unix epoch) Typ string `json:"typ,omitempty"` // token type (Optional). // Email for which the application is requesting delegated access (Optional). Sub string `json:"sub,omitempty"` // contains filtered or unexported fields }
Payload contains information about the JWT signature including the permissions being requested (scopes), the target of the token, the issuer, the time the token was issued, and the lifetime of the token.
Click to show internal directories.
Click to hide internal directories.