diff --git a/packages/express-oauth2-jwt-bearer/src/index.ts b/packages/express-oauth2-jwt-bearer/src/index.ts index 7be0063..c80692d 100644 --- a/packages/express-oauth2-jwt-bearer/src/index.ts +++ b/packages/express-oauth2-jwt-bearer/src/index.ts @@ -67,6 +67,17 @@ declare global { * You must provide the `audience` argument (or `AUDIENCE` environment variable) * used to match against the Access Token's `aud` claim. * + * Successful requests will have the following properties added to them: + * + * ```js + * app.get('/foo', auth(), (req, res, next) => { + * const auth = req.auth; + * auth.header; // The decoded JWT header. + * auth.payload; // The decoded JWT payload. + * auth.token; // The raw JWT token. + * }); + * ``` + * */ export const auth = (opts: AuthOptions = {}): Handler => { const verifyJwt = jwtVerifier(opts);