mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
Complete rewrite of the account management and related systems. Makes the architecture more modular, allowing for easier extensions and configurations.
17 lines
542 B
TypeScript
17 lines
542 B
TypeScript
import { ControlHandler } from './ControlHandler';
|
|
import type { Json } from './InteractionUtil';
|
|
import type { JsonInteractionHandlerInput } from './JsonInteractionHandler';
|
|
|
|
/**
|
|
* A {@link ControlHandler} that only returns results if there is an active OIDC interaction.
|
|
*/
|
|
export class OidcControlHandler extends ControlHandler {
|
|
protected async generateControls(input: JsonInteractionHandlerInput): Promise<NodeJS.Dict<Json>> {
|
|
if (!input.oidcInteraction) {
|
|
return {};
|
|
}
|
|
|
|
return super.generateControls(input);
|
|
}
|
|
}
|