Initial working google auth
This commit is contained in:
parent
fb52d49f74
commit
00a40f6bba
1058 changed files with 114441 additions and 0 deletions
20
auth-service/node_modules/base64url/dist/pad-string.js
generated
vendored
Normal file
20
auth-service/node_modules/base64url/dist/pad-string.js
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
function padString(input) {
|
||||
var segmentLength = 4;
|
||||
var stringLength = input.length;
|
||||
var diff = stringLength % segmentLength;
|
||||
if (!diff) {
|
||||
return input;
|
||||
}
|
||||
var position = stringLength;
|
||||
var padLength = segmentLength - diff;
|
||||
var paddedStringLength = stringLength + padLength;
|
||||
var buffer = Buffer.alloc(paddedStringLength);
|
||||
buffer.write(input);
|
||||
while (padLength--) {
|
||||
buffer.write("=", position++);
|
||||
}
|
||||
return buffer.toString();
|
||||
}
|
||||
exports.default = padString;
|
||||
Loading…
Add table
Add a link
Reference in a new issue