Skip to main content

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:
rpc.go
This subsequent example demonstrates using a client unary interceptor, which authenticates all outgoing requests:
interceptor.go