Added support for PKI tokens in the federated middleware