Open Source API Gateway

tokenValidator

Version

Validates the Authorization header of each request by sending it on a GET to an external validation endpoint; the request continues only if that endpoint responds with HTTP 200, otherwise it is rejected with 400 Bad Request.

See tutorials/oauth2/10-OAuth2-Basics.yaml.

Example Configuration

api:
port: 2000
flow:
- tokenValidator:
endpoint: http://localhost:7007/oauth2/userinfo
api:
   port: 2000
   flow:
     - tokenValidator:
         endpoint: http://localhost:7007/oauth2/userinfo

Syntax

tokenValidator:
endpoint: <string> # required
tokenValidator:
  endpoint: <string> # required

Attributes

NameRequiredDefaultDescriptionExamples
endpointtrue-the endpoint that validates the access token-

Can be used in