Using JSON Web Tokens
This document explains how to handle JSON Web Tokens via both HTTP and gRPC.
HTTP
JSON Web Tokens can only be presented via HTTP requests in the form of an Authorization
header.
Authorization
Header
For applications that communicate with Flipt over HTTP, the Authorization
header is required.
It must be provided in the form Authorization: JWT <jwt>
.
The following examples illustrate this in the context of various programming languages:
GRPC
For gRPC we use the Metadata functionality similar to HTTP Headers.
The lower-case authorization
metadata key should be supplied with a single string JWT <jwt>
to any RPC calls.
Example
The following example authenticates a single gRPC client request:
This subsequent example demonstrates using a client unary interceptor, which authenticates all outgoing requests:
Was this page helpful?