noamokman / express-kerberos Goto Github PK
View Code? Open in Web Editor NEWexpress middleware for simple kerberos authentication
License: MIT License
express middleware for simple kerberos authentication
License: MIT License
I'm sorry, I know some similars was already closed but I can't make it work...
var express = require('express');
var expressKerberos = require('express-kerberos').default;
// var {default: expressKerberos} = require('express-kerberos'); // I tried this too, without success
const app = express();
app.get('/', expressKerberos(), (req, res) => {
res.send(`Hello ${req.auth.username}!`);
});
Any clue ?
I tried to use the middleware as described, but got this error:
NestedError: Simple Kerberos failed to load the "kerberos" module
at Object.<anonymous> (/opt/Dashboard-Express-Server/node_modules/express-kerberos/node_modules/simple-kerberos/lib/index.js:24:9)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/opt/Dashboard-Express-Server/node_modules/express-kerberos/lib/index.js:20:23)
at Module._compile (module.js:653:30)
Caused By: TypeError: kerberosModule.Kerberos is not a constructor
at Object.<anonymous> (/opt/Dashboard-Express-Server/node_modules/express-kerberos/node_modules/simple-kerberos/lib/index.js:22:14)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/opt/Dashboard-Express-Server/node_modules/express-kerberos/lib/index.js:20:23)
at Module._compile (module.js:653:30)
Maybe some issue with the dependency on your other repository simple-kerberos?
Because this project still uses its old version? Just a thought....
NestedError: Simple Kerberos failed to load the "kerberos" module
at Object. (C:\USR\POC_LDAP\node_modules\simple-kerberos\src\index.js:12:9)
at Module._compile (module.js:653:30)
at Module._compile (C:\USR\poc_ldap\node_modules\pirates\lib\index.js:91:24)
at Module._extensions..js (module.js:664:10)
at Object.newLoader [as .js] (C:\USR\poc_ldap\node_modules\pirates\lib\index.js:96:7)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (C:\USR\POC_LDAP\node_modules\express-kerberos\src\index.js:2:1)
at Module._compile (module.js:653:30)
at Module._compile (C:\USR\poc_ldap\node_modules\pirates\lib\index.js:91:24)
at Module._extensions..js (module.js:664:10)
at Object.newLoader [as .js] (C:\USR\poc_ldap\node_modules\pirates\lib\index.js:96:7)
at Module.load (module.js:566:32)
Caused By: TypeError: kerberosModule.Kerberos is not a constructor
at Object. (C:\USR\POC_LDAP\node_modules\simple-kerberos\src\index.js:9:14)
at Module._compile (module.js:653:30)
at Module._compile (C:\USR\poc_ldap\node_modules\pirates\lib\index.js:91:24)
at Module._extensions..js (module.js:664:10)
at Object.newLoader [as .js] (C:\USR\poc_ldap\node_modules\pirates\lib\index.js:96:7)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (C:\USR\POC_LDAP\node_modules\express-kerberos\src\index.js:2:1)
at Module._compile (module.js:653:30)
at Module._compile (C:\USR\poc_ldap\node_modules\pirates\lib\index.js:91:24)
at Module._extensions..js (module.js:664:10)
at Object.newLoader [as .js] (C:\USR\poc_ldap\node_modules\pirates\lib\index.js:96:7)
at Module.load (module.js:566:32)
the propose implementation throw this message error !
any dependency i should install it ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.