mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-11 12:25:42 +00:00
Added primitive support for basic authentication
Note that the password will be passed over HTTP in plain text.
This commit is contained in:
@@ -413,4 +413,16 @@ exports.hashString = function(str) {
|
||||
},0);
|
||||
};
|
||||
|
||||
/*
|
||||
Decode a base64 string
|
||||
*/
|
||||
exports.base64Decode = function(string64) {
|
||||
if($tw.browser) {
|
||||
// TODO
|
||||
throw "$tw.utils.base64Decode() doesn't work in the browser";
|
||||
} else {
|
||||
return (new Buffer(string64,"base64")).toString();
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user