@classmethod
def from_json(cls, json_blob, auth_token):
    """
        Given an impersonation JSON blob, which should look like::

            {
                "RAX-AUTH:impersonation": {
                    "expire-in-seconds": 1000,
                    "user": {
                        "username": "my_user"
                    }
                }
            }

        Along with a header "X-Auth-Token" with the impersonator's token,

        :return: a class:`ImpersonationCredentials` object
        """
    expires_in = json_blob[cls.type_key].get('expire-in-seconds', 86400)
    username = json_blob[cls.type_key]['user']['username']
    return cls(impersonator_token=auth_token, impersonated_username=
        username, expires_in=int(expires_in))
