'Unpack a token, and validate the payload.
:type token: six.text_type
:rtype: six.binary_type'

def unpack(self, token):

    token = TokenFormatter.restore_padding(token)
    try:
        return self.crypto.decrypt(token.encode('utf-8'))
    except fernet.InvalidToken:
        raise exception.ValidationError((_('This    is    not    a    recognized    Fernet    token    %s') % token))
