'Authenticate from dedicated url endpoint.
Build HTTP request body for federated authentication and inject
it into the ``authenticate_for_token`` function.'

def federated_authentication(self, request, idp_id, protocol_id):

    auth = {'identity': {'methods': [protocol_id], protocol_id: {'identity_provider': idp_id, 'protocol': protocol_id}}}
    return self.authenticate_for_token(request, auth=auth)
