passport-keycloak-bearer
Advanced tools
Comparing version 2.1.0 to 2.2.0
{ | ||
"name": "passport-keycloak-bearer", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "HTTP Bearer authentication strategy for Passport and Keycloak", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -87,2 +87,7 @@ # passport-keycloak-bearer | ||
- `jwtFromRequest` (Optional) | ||
This value can be set according [passport-jwt](http://www.passportjs.org/packages/passport-jwt/#extracting-the-jwt-from-the-request) | ||
if this options is not used, passport-keycloak-bearer will obtain jwt from http header Auth as a Bearer token. | ||
- `jsonWebTokenOptions` (Optional) | ||
@@ -89,0 +94,0 @@ |
const KeycloakBearerStrategy = require('./strategy') | ||
module.exports = KeycloakBearerStrategy |
@@ -0,0 +0,0 @@ const axios = require('axios'); |
@@ -0,0 +0,0 @@ const { createLogManager } = require('simple-node-logger') |
@@ -0,0 +0,0 @@ // http://stackoverflow.com/questions/18835132/xml-to-pem-in-node-js |
@@ -16,3 +16,4 @@ const { Strategy, ExtractJwt } = require('passport-jwt') | ||
const opts = setDefaults(options) | ||
opts.jwtFromRequest = ExtractJwt.fromAuthHeaderAsBearerToken() | ||
if (!opts.jwtFromRequest) | ||
opts.jwtFromRequest = ExtractJwt.fromAuthHeaderAsBearerToken() | ||
const oidcManager = new OIDCManager(opts.url, opts.realm, opts.log) | ||
@@ -19,0 +20,0 @@ opts.secretOrKeyProvider = (req, token, done) => { |
@@ -0,0 +0,0 @@ class Token { |
Sorry, the diff of this file is not supported yet
14864
209
140