Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeJwtPart ¶
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.
Types ¶
type CertUtil ¶
type CertUtil interface { // GetWaitTime returns the waiting time before renewing the certificate. GetWaitTime([]byte, time.Time) (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
func (CertUtilImpl) GetWaitTime ¶
GetWaitTime returns the waiting time before renewing the cert, based on current time, the timestamps in cert and grace period.
Click to show internal directories.
Click to hide internal directories.