@raddiamond/nexauth-core
Version:
Core authentication plugin supporting Local, AD authentication
35 lines (34 loc) • 1.07 kB
TypeScript
import { DataSource } from 'typeorm';
import { Tenant } from '../entities/Tenant';
/**
* Manages tenant contexts and client secret generation using the database
*/
export declare class TenantManager {
private db;
constructor(db: DataSource);
/**
* Register a new tenant in the database
*/
registerTenant(tenantData: Partial<Tenant>): Promise<Tenant>;
/**
* Get a tenant by tenantId
*/
getTenant(tenantId: string): Promise<Tenant | undefined>;
/**
* Validate client credentials for a tenant
*/
validateClientCredentials(tenantId: string, clientId: string): Promise<boolean>;
/**
* Generate a client secret for a tenant (utility)
*/
generateClientSecret(tenantId: string): Promise<string>;
/**
* Configure UI provider for a tenant
*/
configureUIProvider(tenantId: string, clientId: string, redirectUrl: string, allowedOrigins: string[]): Promise<{
clientId: string;
clientSecret: string;
redirectUrl: string;
allowedOrigins: string[];
}>;
}