Skip to content
This repository was archived by the owner on Sep 1, 2023. It is now read-only.

0.0.11: Implemented JWT support

Choose a tag to compare

@adamkewley adamkewley released this 18 Feb 14:43
· 227 commits to master since this release
- Implemented support for JSON Web Tokens (JWTs)
- Clients can now set `authentication: type` to "jwt" in the server config
- A `secretKey` also needs to be set in the `authentication:` config. For example:

```
authentication:
  type: jwt
  secretKey: +LY2OXK7Fb... [a base64 string]
```

- With JWT auth enabled, Jobson searches for an `Authorization` HTTP header with
  the value `Bearer {jwt-token}`, where `{jwt-token}` is a standard JWT token encoded
  via HS512 encryption (non-configurable)
- The JWT's claims are accepted as-is if the server can verify the JWT was compiled with
  the secretKey; otherwise, the request will be rejected as unauthorized
- Stateless JWTs allow internal clusters/microservices to handle authentication separately
  from the server