Multi-Auth Pattern Showcase with APISIX
This service demonstrates three different authentication approaches for modern web applications.
Server-Side Rendered (SSR) application with traditional session cookies. Backend handles all OAuth flows.
Try Session Auth âMachine-to-Machine authentication with JWT Bearer tokens. For service-to-service communication.
View M2M API âSingle Page Application with Authorization Code + PKCE flow. No client secret needed.
Try SPA PKCE âDemonstrate how APISIX controls API access without changing application code. The same endpoint can be public or JWT-protected via APISIX configuration.
/api/healthCurrent APISIX Config: PUBLIC
# helm/templates/apisix-route-public.yaml
- name: health-check
match:
paths:
- /api/health
backends:
- serviceName: testservice
# NO authentication plugin
# helm/templates/apisix-route-protected.yaml
- name: health-check
match:
paths:
- /api/health
backends:
- serviceName: testservice
plugins:
- name: openid-connect
enable: true
config:
bearer_only: true
use_jwks: true
secretRef: oauth-client-secret
⨠Zero Code Changes! Same backend code, different APISIX route = different behavior.
This service demonstrates the migration from oauth2-proxy to Apache APISIX API Gateway. All three authentication patterns are configured via APISIX routes with different plugins:
openid-connect plugin with session cookiesjwt-auth plugin with JWKS validationopenid-connect plugin in bearer-only modeFeatures: Rate Limiting, CORS, Security Headers, Prometheus Metrics