@labdigital/federated-token-envelop
v1.0.0
Published
Federate JWT tokens between GraphQL servers
Downloads
205
Readme
Federated Token - Envelop Plugin
This packages provides an Envelop plugin so that for example Yoga can be used as a federated service. I
It provides three Apollo specific classes:
federatedAuthPlugin
- An Apollo plugin for federated services that reads the token passed in thex-access-token
header and stores it on the context asfederatedToken
.
When a federated services creates a new token (when non exist) it can also
return a refresh token in the x-refresh-token
header. The gateway will then
encrypt all refresh tokens and encrypt them before passing them to the client
as x-refresh-token
header.