Authenticating with a Credentials File
Last updated
Was this helpful?
Last updated
Was this helpful?
The 2.0 version of NATS server introduced the idea of decentralized authentication based on . Clients interact with this new scheme using a and corresponding private key. To help make connecting with a JWT easier, the client libraries support the concept of a credentials file. This file contains both the private key and the JWT and can be generated with the nsc
. The contents will look like the following and should be protected because it contains a private key. This credentials file is unused and only for example purposes.
Given a creds file, a client can authenticate as a specific user belonging to a specific account: