This commit is contained in:
Bastian Wagner
2026-07-15 17:08:17 +02:00
parent 426c18ad57
commit d0600ab6ac
9 changed files with 206 additions and 43 deletions

View File

@@ -63,13 +63,13 @@ export class OidcProviderService implements OnModuleInit {
): Promise<void> {
const details = await this.interactionDetails(request, response);
if (details.uid !== uid || details.prompt.name !== 'login') {
throw new UnauthorizedException('Ungueltige OIDC-Interaktion.');
throw new UnauthorizedException('Ungültige OIDC-Interaktion.');
}
const valid = await this.ldapAuth.verifyPassword(username, password);
if (!valid) {
await this.audit.record({ type: 'oidc.login_failed', username, ipAddress: request.ip, userAgent: request.headers['user-agent'] });
throw new UnauthorizedException('Ungueltige Zugangsdaten.');
throw new UnauthorizedException('Ungültige Zugangsdaten.');
}
const account = await this.lldap.getAccount(username);
@@ -96,7 +96,7 @@ export class OidcProviderService implements OnModuleInit {
async finishConsent(request: Request, response: Response, uid: string): Promise<void> {
const details = await this.interactionDetails(request, response);
if (details.uid !== uid || details.prompt.name !== 'consent') {
throw new UnauthorizedException('Ungueltige OIDC-Interaktion.');
throw new UnauthorizedException('Ungültige OIDC-Interaktion.');
}
const clientId = String(details.params.client_id ?? '');