a12n-server
Advanced tools
Comparing version 0.3.3 to 0.3.4
Changelog | ||
========= | ||
0.3.4 (2018-11-02) | ||
------------------ | ||
* Fixed a bug that would cause sessions to be forgotten with every request. | ||
* Removed a bunch of debug code. | ||
0.3.3 (2018-11-01) | ||
@@ -5,0 +12,0 @@ ------------------ |
@@ -14,2 +14,14 @@ "use strict"; | ||
function default_1() { | ||
const middlewares = [ | ||
hal_browser_1.default({ | ||
title: 'a12n-server', | ||
}), | ||
problem_1.default(), | ||
session_1.default({ | ||
store: 'memory', | ||
}), | ||
login_1.default(), | ||
bodyparser_1.default(), | ||
...routes_1.default, | ||
]; | ||
/** | ||
@@ -19,14 +31,3 @@ * This middleware contains all the a12n-server functionality. | ||
return (ctx, next) => { | ||
return core_1.invokeMiddlewares(ctx, [ | ||
hal_browser_1.default({ | ||
title: 'a12n-server', | ||
}), | ||
problem_1.default(), | ||
session_1.default({ | ||
store: 'memory', | ||
}), | ||
login_1.default(), | ||
bodyparser_1.default(), | ||
...routes_1.default, | ||
]); | ||
return core_1.invokeMiddlewares(ctx, middlewares); | ||
}; | ||
@@ -33,0 +34,0 @@ } |
@@ -5,3 +5,2 @@ "use strict"; | ||
const authHeader = ctx.request.headers.get('Authorization'); | ||
console.log(authHeader); | ||
if (!authHeader) { | ||
@@ -11,3 +10,2 @@ return null; | ||
const parts = authHeader.split(' ', 2); | ||
console.log(parts); | ||
if (parts.length < 2 || parts[0].toLowerCase() !== 'basic') { | ||
@@ -17,3 +15,2 @@ return null; | ||
const decoded = Buffer.from(parts[1], 'base64').toString().split(':', 2); | ||
console.log(decoded); | ||
if (decoded.length < 2) { | ||
@@ -20,0 +17,0 @@ return null; |
{ | ||
"name": "a12n-server", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"main": "dist/index.js", | ||
"description": "A ready-to-launch User and Authentication system for those that don't want to build it", | ||
"scripts": { | ||
"prepublish": "make build", | ||
"prepublishOnly": "make build", | ||
"test": "make lint test", | ||
@@ -9,0 +9,0 @@ "tsc": "tsc", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
112309
1740