Request about custom claims

Hi to all, I’ve a custom user storage spi that doesn’t look in an external db but makes some query on an existing login api.
At now the user is correctly authenticated and I can retrieve the user attributes that I map with mappers in claim. during authentication phase i need to populate other custom claims making query on an external entity. The problem is that during the login phase (before the user is authenticated) I’ve only the username and I need also the client_id of keycloak to make the external query.
is there a way to retrieve the client_id in the userstorage spi in authentication phase? if not, is possible to add after authentication some claim using custom code?
thanks :wink: