/// <exception cref="System.IO.IOException"/> public virtual UserGroupInformation VerifyToken <_T0>(Org.Apache.Hadoop.Security.Token.Token <_T0> token) where _T0 : AbstractDelegationTokenIdentifier { AbstractDelegationTokenIdentifier id = secretManager.DecodeTokenIdentifier(token); secretManager.VerifyToken(id, token.GetPassword()); return(id.GetUser()); }
> CreateToken(UserGroupInformation ugi, string renewer) { renewer = (renewer == null) ? ugi.GetShortUserName() : renewer; string user = ugi.GetUserName(); Text owner = new Text(user); Text realUser = null; if (ugi.GetRealUser() != null) { realUser = new Text(ugi.GetRealUser().GetUserName()); } AbstractDelegationTokenIdentifier tokenIdentifier = (AbstractDelegationTokenIdentifier )secretManager.CreateIdentifier(); tokenIdentifier.SetOwner(owner); tokenIdentifier.SetRenewer(new Text(renewer)); tokenIdentifier.SetRealUser(realUser); return(new Org.Apache.Hadoop.Security.Token.Token(tokenIdentifier, secretManager)); }