@universal-packages/authentication
Advanced tools
Comparing version 1.0.0 to 1.0.1
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Encrypt = exports.AuthDynamicHook = exports.AuthDynamic = void 0; | ||
const crypto_1 = require("./crypto"); | ||
const crypto_utils_1 = require("@universal-packages/crypto-utils"); | ||
var dynamic_api_1 = require("@universal-packages/dynamic-api"); | ||
@@ -15,3 +15,3 @@ Object.defineProperty(exports, "AuthDynamic", { enumerable: true, get: function () { return dynamic_api_1.Dynamic; } }); | ||
set: function (value) { | ||
this[finalPropertyToEncrypt] = (0, crypto_1.hashSubject)(value); | ||
this[finalPropertyToEncrypt] = (0, crypto_utils_1.hashSubject)(value); | ||
this[hiddenProperty] = value; | ||
@@ -18,0 +18,0 @@ }, |
@@ -9,3 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const crypto_1 = require("../../crypto"); | ||
const crypto_utils_1 = require("@universal-packages/crypto-utils"); | ||
const decorators_1 = require("../../decorators"); | ||
@@ -18,3 +18,3 @@ let DecryptCorroborationTokenDynamic = class DecryptCorroborationTokenDynamic { | ||
const secret = authentication.performDynamicSync('generate-concern-secret', { concern: 'corroboration', credential, credentialKind }); | ||
return (0, crypto_1.decryptSubject)(payload.token, secret); | ||
return (0, crypto_utils_1.decryptSubject)(payload.token, secret, { concern: 'corroboration' }); | ||
} | ||
@@ -21,0 +21,0 @@ }; |
@@ -9,3 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const crypto_1 = require("../../crypto"); | ||
const crypto_utils_1 = require("@universal-packages/crypto-utils"); | ||
const decorators_1 = require("../../decorators"); | ||
@@ -18,3 +18,3 @@ let DecryptInvitationTokenDynamic = class DecryptInvitationTokenDynamic { | ||
const secret = authentication.performDynamicSync('generate-concern-secret', { concern: 'invitation', credential, credentialKind }); | ||
return (0, crypto_1.decryptSubject)(token, secret); | ||
return (0, crypto_utils_1.decryptSubject)(token, secret, { concern: 'invitation' }); | ||
} | ||
@@ -21,0 +21,0 @@ }; |
@@ -9,3 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const crypto_1 = require("../../crypto"); | ||
const crypto_utils_1 = require("@universal-packages/crypto-utils"); | ||
const decorators_1 = require("../../decorators"); | ||
@@ -16,3 +16,3 @@ let EncryptCorroborationPayloadDynamic = class EncryptCorroborationPayloadDynamic { | ||
const secret = authentication.performDynamicSync('generate-concern-secret', { concern: 'corroboration', credential, credentialKind }); | ||
return (0, crypto_1.encryptSubject)(corroboration, secret); | ||
return (0, crypto_utils_1.encryptSubject)(corroboration, secret, { concern: 'corroboration' }); | ||
} | ||
@@ -19,0 +19,0 @@ }; |
@@ -9,3 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const crypto_1 = require("../../crypto"); | ||
const crypto_utils_1 = require("@universal-packages/crypto-utils"); | ||
const decorators_1 = require("../../decorators"); | ||
@@ -16,3 +16,3 @@ let EncryptInvitationPayloadDynamic = class EncryptInvitationPayloadDynamic { | ||
const secret = authentication.performDynamicSync('generate-concern-secret', { concern: 'invitation', credential, credentialKind }); | ||
return (0, crypto_1.encryptSubject)(invitation, secret); | ||
return (0, crypto_utils_1.encryptSubject)(invitation, secret, { concern: 'invitation' }); | ||
} | ||
@@ -19,0 +19,0 @@ }; |
@@ -9,3 +9,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const crypto_1 = require("../../crypto"); | ||
const crypto_utils_1 = require("@universal-packages/crypto-utils"); | ||
const decorators_1 = require("../../decorators"); | ||
@@ -15,3 +15,3 @@ let IsAuthenticatablePasswordDynamic = class IsAuthenticatablePasswordDynamic { | ||
const { authenticatable, password } = payload; | ||
return (0, crypto_1.checkSubjectHash)(password, authenticatable.encryptedPassword); | ||
return (0, crypto_utils_1.checkSubjectHash)(password, authenticatable.encryptedPassword); | ||
} | ||
@@ -18,0 +18,0 @@ }; |
export { default as Authentication } from './Authentication'; | ||
export * from './Authentication.types'; | ||
export * from './crypto'; | ||
export * from './decorators'; | ||
export { default as AttributesValidation } from './validations/AttributesValidation'; |
@@ -24,3 +24,2 @@ "use strict"; | ||
__exportStar(require("./Authentication.types"), exports); | ||
__exportStar(require("./crypto"), exports); | ||
__exportStar(require("./decorators"), exports); | ||
@@ -27,0 +26,0 @@ var AttributesValidation_1 = require("./validations/AttributesValidation"); |
{ | ||
"name": "@universal-packages/authentication", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Dynamic authentication api", | ||
@@ -17,2 +17,3 @@ "author": "David De Anda <david@universal-packages.com> (https://github.com/universal-packages)", | ||
"dependencies": { | ||
"@universal-packages/crypto-utils": "^1.0.0", | ||
"@universal-packages/dynamic-api": "^1.5.0", | ||
@@ -19,0 +20,0 @@ "@universal-packages/time-based-one-time-password": "^1.0.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
249213
7
195
2818
+ Added@universal-packages/crypto-utils@1.2.0(transitive)