log
This commit is contained in:
@@ -285,6 +285,27 @@ export class OidcProviderService implements OnModuleInit {
|
||||
provider.on('access_token.issued', (token) => {
|
||||
void this.audit.record({ type: 'oidc.access_token_issued', username: token.accountId, metadata: { clientId: token.clientId } });
|
||||
});
|
||||
provider.on('interaction.started', (ctx, prompt) => {
|
||||
const oidcContext = ctx as {
|
||||
path?: string;
|
||||
oidc?: {
|
||||
client?: { clientId?: string };
|
||||
params?: Record<string, unknown>;
|
||||
entities?: { Interaction?: { uid?: string } };
|
||||
};
|
||||
};
|
||||
void this.audit.record({
|
||||
type: 'oidc.interaction_started',
|
||||
metadata: {
|
||||
prompt: typeof prompt === 'object' && prompt && 'name' in prompt ? String(prompt.name) : undefined,
|
||||
path: oidcContext.path,
|
||||
clientId: oidcContext.oidc?.client?.clientId ?? oidcContext.oidc?.params?.client_id,
|
||||
redirectUri: oidcContext.oidc?.params?.redirect_uri,
|
||||
scope: oidcContext.oidc?.params?.scope,
|
||||
interactionUid: oidcContext.oidc?.entities?.Interaction?.uid,
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private registerErrorEvents(provider: Provider): void {
|
||||
|
||||
Reference in New Issue
Block a user