symblight-fastify-oauth2-jwt
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "symblight-fastify-oauth2-jwt", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "", | ||
@@ -53,2 +53,2 @@ "main": "dist/index.js", | ||
} | ||
} | ||
} |
@@ -14,3 +14,3 @@ ## Getting started | ||
```shell | ||
npm install @symblight/fastify-oauth2-jwt-bearer | ||
npm install symblight-fastify-oauth2-jwt | ||
``` | ||
@@ -28,8 +28,8 @@ | ||
```js | ||
const { fastifyOauth2 } = require('fastify-oauth2-jwt-bearer'); | ||
const { fastifyOauth2 } = require("symblight-fastify-oauth2-jwt"); | ||
app.register(fastifyOauth2, { | ||
audience: '', | ||
audience: "", | ||
issuerBaseURL: ``, | ||
jwksUri: '', | ||
algorithms: ['RS256'], | ||
jwksUri: "", | ||
algorithms: ["RS256"], | ||
}); | ||
@@ -44,3 +44,3 @@ ``` | ||
req.body, | ||
!!reply.header('Content-type', 'urlencoded') | ||
!!reply.header("Content-type", "urlencoded") | ||
); | ||
@@ -50,9 +50,9 @@ return await app.Oauth2.verifyJwt(jwt); | ||
app.get('/', async function (request, reply) { | ||
app.get("/", async function (request, reply) { | ||
request.auth = await checkJwt(request, reply); | ||
return reply | ||
.status(200) | ||
.header('Content-Type', 'application/json; charset=utf-8') | ||
.header("Content-Type", "application/json; charset=utf-8") | ||
.send(request.auth?.payload); | ||
}); | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19265