Allow authentication for specific implementations of Public Key Infrastructure

Hi, friends.

I needed to adapt app user_saml to allow login with ICP-Brasil security token. I thought to create a generic soluction, for any public key infrastructure, then I submitted a pull request with abstraction that I used. I got to solve my problem that it was to check user from token against user from LDAP.

I invite who uses security token to extend my abstraction and give me feedback.