Access the user's typed password in plain text

Hello everyone,
I have quite an unusual problem/inquiry. Is it possible to access the user’s typed password in plain text for a specific client (possibly by modifying the flow Browser in Authentication)? Finally, I would like to achieve the state:

  1. User logs in, types username, and password,
  2. If the User logs in to a specific client, Keycloak takes his password (before destroying it in plain text) performs the action (probably defined by custom mapper (sth like hash function with more parameters) and returns the value as attribute is scope,
    Does anyone have any suggestions on how to do this?

Wouldn’t that be very very insecure?