diff --git a/package.json b/package.json index fecd6ed..df77a79 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aldap", - "version": "1.0.0", + "version": "1.0.1", "description": "Authentication LDAP server", "repository": "git@gitlab.com:ArisuOngaku/aldap.git", "author": "Alice Gaudon ", diff --git a/src/models/UserPasswordComponent.ts b/src/models/UserPasswordComponent.ts index 0525309..26aeac3 100644 --- a/src/models/UserPasswordComponent.ts +++ b/src/models/UserPasswordComponent.ts @@ -75,7 +75,11 @@ export class PasswordAuthProof implements AuthProof { } public async isValid(): Promise { - return await this.isAuthorized() || typeof this.userID === 'number'; + if (typeof this.userID === 'number') { + return Boolean(await this.getResource()); + } else { + return await this.isAuthorized(); + } } public async revoke(): Promise { diff --git a/views/account.njk b/views/account.njk index 4aa80d8..31cf255 100644 --- a/views/account.njk +++ b/views/account.njk @@ -110,7 +110,7 @@ {% else %} - No recovery email address. + No identity (yet). {% endfor %} diff --git a/yarn.lock b/yarn.lock index a8d11b9..681fbbe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9886,9 +9886,9 @@ widest-line@^3.1.0: string-width "^4.0.0" wms-core@^0: - version "0.20.0" - resolved "https://registry.toot.party/wms-core/-/wms-core-0.20.0.tgz#679c0a1076a96d4a03cc4eeafba900e6a5a9b30f" - integrity sha512-UplsZCR4Dm85Qy22JbDPBkOhp+nUN8KYtbpMipqmo/F9t3M+qtLNGktoy/at0dBc6vR+/8WCuR1aRBeuMINR5A== + version "0.20.1" + resolved "https://registry.toot.party/wms-core/-/wms-core-0.20.1.tgz#c63a1b6b5cd4669e97fa0b651cd5fa6496f6305c" + integrity sha512-JZkrLgxoPBSOf8P5KB9Fc5IoEoWyw6qMoSukpCIi14iue/rm/rW5M9D0Y3dy6tio3w7ZRsrcQdYbIkXW228lzQ== dependencies: argon2 "^0.26.2" compression "^1.7.4"