[auth] Import and adapt auth from art17.