Updated API for delegation token

It works like that. The first if checks that both were not provided at the same time. The second one checks if at least one was provided.