Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hden/duct.auth.jwks
A Duct library to retrieve RSA public keys from a JWKS (JSON Web Key Set) endpoint.
https://github.com/hden/duct.auth.jwks
Last synced: 3 months ago
JSON representation
A Duct library to retrieve RSA public keys from a JWKS (JSON Web Key Set) endpoint.
- Host: GitHub
- URL: https://github.com/hden/duct.auth.jwks
- Owner: hden
- Created: 2020-03-06T02:13:17.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-01T03:28:26.000Z (4 months ago)
- Last Synced: 2024-10-03T12:16:39.071Z (4 months ago)
- Language: Clojure
- Size: 52.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# duct.auth.jwks [![CircleCI](https://circleci.com/gh/hden/duct.auth.jwks.svg?style=svg)](https://circleci.com/gh/hden/duct.auth.jwks)
A Duct library to retrieve RSA public keys from a JWKS (JSON Web Key Set) endpoint.
## Installation
To install, add the following to your project `:dependencies`:
```
[hden/duct.auth.jwks "0.2.0"]
```## Usage
This library currently only supports a single Integrant key: `:duct.auth.jwks/provider`. This keyword wraps the [jwks-rsa-java](https://github.com/auth0/jwks-rsa-java) library. The domain is denoted by a keyword on the `:domain` key:
```clojure
{:duct.middleware.buddy/authentication
{:backend :jws
:token-name "Bearer"
:options {:alg :rs256}
:secret #ig/ref :duct.auth.jwks/provider
:authfn #ig/ref :example.auth/auth-function}:duct.auth.jwks/provider
{:domain "https://samples.auth0.com/"}:example.auth/auth-function {}}
```## License
Copyright © 2020 Haokang Den
This program and the accompanying materials are made available under the
terms of the Eclipse Public License 2.0 which is available at
http://www.eclipse.org/legal/epl-2.0.