I have a keycloak app that calls an external TokenValidator for authentication. This TokenValidator returns a SP specific username value. I want my SAML response to contain this value in the NameID field. My question is how do I edit the SAML response to change the value in NameID field to this value?

Any insight into how to edit the NameID field in the SAML response?