@Override
public String getDelegationToken(final String owner, final String renewer)
throws IOException, InterruptedException {
if (!authenticationMethod.get().equals(AuthenticationMethod.KERBEROS)) {
throw new AuthorizationException(
"Delegation Token can be issued only with kerberos authentication");
}
//if the user asking the token is same as the 'owner' then don't do
//any proxy authorization checks. For cases like oozie, where it gets
//a delegation token for another user, we need to make sure oozie is