feat(control-panel): add oidc account switching
This commit is contained in:
@@ -8,9 +8,10 @@ import { ChatModule } from './chat/chat.module.js';
|
||||
import { ProviderAuthModule } from './provider-auth/provider-auth.module.js';
|
||||
import { GoalsModule } from './goals/goals.module.js';
|
||||
import { EvidenceModule } from './evidence/evidence.module.js';
|
||||
import { SessionController } from './session/session.controller.js';
|
||||
|
||||
@Module({
|
||||
imports: [TelemetryModule, SettingsModule, KillSwitchModule, ApprovalsModule, ChatModule, ProviderAuthModule, GoalsModule, EvidenceModule],
|
||||
controllers: [HealthController],
|
||||
controllers: [HealthController, SessionController],
|
||||
})
|
||||
export class AppModule {}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import { Controller, Get, Headers } from '@nestjs/common';
|
||||
import { ok } from '../common/api-response.js';
|
||||
import { actorFromHeaders } from '../common/auth-context.js';
|
||||
|
||||
@Controller('api/v1/session')
|
||||
export class SessionController {
|
||||
@Get()
|
||||
current(@Headers() headers: Record<string, string | string[] | undefined>) {
|
||||
return ok(actorFromHeaders(headers));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user