devise_saml_authenticatable
devise_saml_authenticatable copied to clipboard
How to decrypt base64 SAML response ?
Hello Everyone,
I used this gem in our application to setup Shibboleth based authentication. The SAML response received from Identity provider is base64 encoded.
I have following setup in attribute-map.yml,
"urn:mace:dir:attribute-def:mail" : "email"
After successful login, I see that it is storing encoded value in the email column of users table. What do I need to do to decrypt the base64 encoded SAML response ?
Please advice.
Thank you for your time.
@anantaUM check out the saml_update_resource_hook configuration: https://github.com/apokalipto/devise_saml_authenticatable/blob/37d457b394b63f360ac0f784ab35c5ceedf4e779/lib/devise_saml_authenticatable.rb#L117-L121. You can override that to add custom behavior when updating user attributes.