Documentation ¶
Index ¶
Constants ¶
View Source
const ( PKI_ASN1_PREFIX = "MII" PKIZ_PREFIX = "PKIZ_" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Validator ¶
type Validator struct { // Service account to talk to keystone SvcAuthOpts openstack.AuthOpts // File path the signing cert would be stored/cached CachedSigningKeyPath string TokenId string // Token revocation list memory cache duration RevCacheDuration time.Duration }
func NewValidator ¶
func NewValidator(authOpts openstack.AuthOpts, token string, signingKeyPath string, revCacheSecs int) *Validator
NewValidator gets the credential for service account, token need to be validated, signing cert location (will store the cert from keystone if not there), and the revocation list cache duration (in seconds) and returns the validator.
func (*Validator) Validate ¶
Validate does the local validation for PKI & PKIZ token and sends to keystone for other format tokens validation. It returns the extracted AuthToken struct
func (*Validator) ValidateOffline ¶
Validate the token locally without sending to keystone It take the token body and return the extracted access object as []byte
Click to show internal directories.
Click to hide internal directories.