grant types configurable

after rebase of #68