Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractJwtAud ¶
ExtractJwtAud extracts the audiences from a JWT token. If aud cannot be parse, the bool will be set to false. This distinguishes aud=[] from not parsed.
func IsK8SUnbound ¶
IsK8SUnbound detects if the token is a K8S unbound token. It is a regular JWT with no audience and expiration, which can be exchanged with bound tokens with audience.
This is used to determine if we check audience in the token. Clients should not use unbound tokens except in cases where bound tokens are not possible.
Types ¶
type CertUtil ¶
type CertUtil interface { // GetWaitTime returns the waiting time before renewing the certificate. GetWaitTime([]byte, time.Time, time.Duration) (time.Duration, error) }
CertUtil is an interface for utility functions on certificate.
type CertUtilImpl ¶
type CertUtilImpl struct {
// contains filtered or unexported fields
}
CertUtilImpl is the implementation of CertUtil, for production use.
func NewCertUtil ¶
func NewCertUtil(gracePeriodPercentage int) CertUtilImpl
NewCertUtil returns a new CertUtilImpl
Click to show internal directories.
Click to hide internal directories.