1.0.0-beta.7 • Published 7 months ago
@vckit/oauth-middleware v1.0.0-beta.7
OAuth middleware
OAuth middleware is a package that provides OAuth2 JWT bearer token authentication middleware for Express applications.
Usage
Add the configuration for OAuth middleware to the agent.yml file in the root of your project.
- $require: '@vckit/oauth-middleware?t=function#apiOAuth' $args: - issuerBaseURL: <your_issuer_base_url> audience: <your_audience>
Make sure to replace <your_issuer_base_url> with the base URL of your issuer, and <your_audience> with the audience.
You can obtain these values from your OAuth provider, such as Auth0 (https://auth0.com/docs).
To test the middleware:
- Start the server by running the command
pnpm vckit server
. - Obtain a JWT token from your OAuth provider, such as Auth0, you can read more about it here: https://auth0.com/docs/secure/tokens/access-tokens/get-access-tokens#example-post-to-token-url.
- Set the obtained JWT token as the value of the
Authorization
header in your requests to the server. - Make requests to the server, and the OAuth middleware will handle the authentication based on the JWT token provided.
1.0.0-next.99
7 months ago
1.0.0-next.98
7 months ago
1.0.0-next.96
7 months ago
1.0.0-next.164
7 months ago
1.0.0-beta.6
7 months ago
1.0.0-beta.7
7 months ago
1.0.0-next.93
7 months ago
1.0.0-next.60
11 months ago
1.0.0-next.59
11 months ago
1.0.0-next.58
11 months ago
1.0.0-next.55
11 months ago
1.0.0-next.54
11 months ago
1.0.0-next.57
11 months ago
1.0.0-next.56
11 months ago
1.0.0-beta.5
11 months ago