feat(opsserver,web): replace the Angular UI and REST management layer with a TypedRequest-based ops server and bundled web frontend
This commit is contained in:
@@ -9,8 +9,8 @@
|
||||
import type { AuthProvider } from '../../../models/auth.provider.ts';
|
||||
import type { CryptoService } from '../../crypto.service.ts';
|
||||
import type {
|
||||
IExternalUserInfo,
|
||||
IConnectionTestResult,
|
||||
IExternalUserInfo,
|
||||
} from '../../../interfaces/auth.interfaces.ts';
|
||||
import type { IAuthStrategy } from './auth.strategy.interface.ts';
|
||||
|
||||
@@ -23,7 +23,7 @@ interface ILdapEntry {
|
||||
export class LdapStrategy implements IAuthStrategy {
|
||||
constructor(
|
||||
private provider: AuthProvider,
|
||||
private cryptoService: CryptoService
|
||||
private cryptoService: CryptoService,
|
||||
) {}
|
||||
|
||||
/**
|
||||
@@ -31,7 +31,7 @@ export class LdapStrategy implements IAuthStrategy {
|
||||
*/
|
||||
public async authenticateCredentials(
|
||||
username: string,
|
||||
password: string
|
||||
password: string,
|
||||
): Promise<IExternalUserInfo> {
|
||||
const config = this.provider.ldapConfig;
|
||||
if (!config) {
|
||||
@@ -55,7 +55,7 @@ export class LdapStrategy implements IAuthStrategy {
|
||||
bindPassword,
|
||||
config.baseDn,
|
||||
userFilter,
|
||||
password
|
||||
password,
|
||||
);
|
||||
|
||||
// Map LDAP attributes to user info
|
||||
@@ -86,7 +86,7 @@ export class LdapStrategy implements IAuthStrategy {
|
||||
config.serverUrl,
|
||||
config.bindDn,
|
||||
bindPassword,
|
||||
config.baseDn
|
||||
config.baseDn,
|
||||
);
|
||||
|
||||
return {
|
||||
@@ -129,7 +129,7 @@ export class LdapStrategy implements IAuthStrategy {
|
||||
bindPassword: string,
|
||||
baseDn: string,
|
||||
userFilter: string,
|
||||
userPassword: string
|
||||
userPassword: string,
|
||||
): Promise<ILdapEntry> {
|
||||
// In a real implementation, this would:
|
||||
// 1. Connect to LDAP server
|
||||
@@ -150,7 +150,7 @@ export class LdapStrategy implements IAuthStrategy {
|
||||
|
||||
throw new Error(
|
||||
'LDAP authentication is not yet fully implemented. ' +
|
||||
'Please integrate with a Deno-compatible LDAP library (e.g., ldapts via npm compatibility).'
|
||||
'Please integrate with a Deno-compatible LDAP library (e.g., ldapts via npm compatibility).',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ export class LdapStrategy implements IAuthStrategy {
|
||||
serverUrl: string,
|
||||
bindDn: string,
|
||||
bindPassword: string,
|
||||
baseDn: string
|
||||
baseDn: string,
|
||||
): Promise<void> {
|
||||
// Similar to ldapBind, this is a placeholder
|
||||
// Would connect and bind with service account to verify connectivity
|
||||
@@ -185,7 +185,9 @@ export class LdapStrategy implements IAuthStrategy {
|
||||
|
||||
// Return success for configuration validation
|
||||
// Actual connectivity test would happen with LDAP library
|
||||
console.log('[LdapStrategy] LDAP configuration is valid (actual connection test requires LDAP library)');
|
||||
console.log(
|
||||
'[LdapStrategy] LDAP configuration is valid (actual connection test requires LDAP library)',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -206,15 +208,9 @@ export class LdapStrategy implements IAuthStrategy {
|
||||
return {
|
||||
externalId,
|
||||
email,
|
||||
username: entry[mapping.username]
|
||||
? String(entry[mapping.username])
|
||||
: undefined,
|
||||
displayName: entry[mapping.displayName]
|
||||
? String(entry[mapping.displayName])
|
||||
: undefined,
|
||||
groups: mapping.groups
|
||||
? this.parseGroups(entry[mapping.groups])
|
||||
: undefined,
|
||||
username: entry[mapping.username] ? String(entry[mapping.username]) : undefined,
|
||||
displayName: entry[mapping.displayName] ? String(entry[mapping.displayName]) : undefined,
|
||||
groups: mapping.groups ? this.parseGroups(entry[mapping.groups]) : undefined,
|
||||
rawAttributes: entry as Record<string, unknown>,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user