Ok, so I answer to myself. I created 2 template and 1 controller.
You need tu put the controller in
[galaxy_install_dir]/lib/galaxy/webapps/galaxy/controllers/userskeys.py
Contains the user interface in the Universe class
import glob
import logging
import os
import socket
import string
Hi,
I would like to create a tool or a template that could list and
(re)generate key for the user you want if you are login as an admin.
I found the api_keys function in the user controller but I don't know how
to use it. It seems that the decorators before the function checked if you
are login