CallbackResponse captures all the response data of the call back processing.
Processor holds all the local data of the authorization engine. A processor can handle authorization for multiple services. The goal is to authenticate a request based on both service and user credentials.
NewProcessor creates an auth processor with PKI user tokens. The caller must provide a valid secrets structure and an optional list of trustedCertificates that can be used to validate tokens. If the list is empty, the CA from the secrets will be used for token validation.
func (p *Processor) AddOrUpdateService(apis *urisearch.APICache, serviceType policy.UserAuthorizationTypeValues, handler usertokens.Verifier, mappings map[string]string)
AddOrUpdateService adds or replaces a service in the authorization db.
Callback is function called by and IDP auth provider will exchange the provided authorization code with a JWT token. This closes the Oauth loop.
Check is the main method that will search API cache and validate whether the call should be allowed. It returns two values. If the access is allowed, and whether the access public or not. This allows callers to decide what to do when there is a failure, and potentially issue a redirect.
DecodeAporetoClaims decodes the Aporeto claims
DecodeUserClaims decodes the user claims with the user authorization method.
RedirectURI returns the redirect URI in order to start the authentication dance.
RetrieveServiceHandler will retrieve the service that is stored in the serviceMap
UpdateRequestHeaders will update the request headers based on the user claims and the corresponding mappings.
UpdateSecrets will update the Aporeto secrets for the validation of the Aporeto tokens.
UpdateServiceAPIs updates an existing service with a new API definition.