Implements the authenticate API method on Identity