public static Org.Apache.Hadoop.Oncrpc.Security.Credentials ReadFlavorAndCredentials (XDR xdr) { RpcAuthInfo.AuthFlavor flavor = RpcAuthInfo.AuthFlavor.FromValue(xdr.ReadInt()); Org.Apache.Hadoop.Oncrpc.Security.Credentials credentials; if (flavor == RpcAuthInfo.AuthFlavor.AuthNone) { credentials = new CredentialsNone(); } else { if (flavor == RpcAuthInfo.AuthFlavor.AuthSys) { credentials = new CredentialsSys(); } else { if (flavor == RpcAuthInfo.AuthFlavor.RpcsecGss) { credentials = new CredentialsGSS(); } else { throw new NotSupportedException("Unsupported Credentials Flavor " + flavor); } } } credentials.Read(xdr); return(credentials); }
/// <summary>Read both AuthFlavor and the verifier from the XDR</summary> public static Org.Apache.Hadoop.Oncrpc.Security.Verifier ReadFlavorAndVerifier(XDR xdr) { RpcAuthInfo.AuthFlavor flavor = RpcAuthInfo.AuthFlavor.FromValue(xdr.ReadInt()); Org.Apache.Hadoop.Oncrpc.Security.Verifier verifer; if (flavor == RpcAuthInfo.AuthFlavor.AuthNone) { verifer = new VerifierNone(); } else { if (flavor == RpcAuthInfo.AuthFlavor.RpcsecGss) { verifer = new VerifierGSS(); } else { throw new NotSupportedException("Unsupported verifier flavor" + flavor); } } verifer.Read(xdr); return(verifer); }
protected internal RpcAuthInfo(RpcAuthInfo.AuthFlavor flavor) { this.flavor = flavor; }
protected internal Verifier(RpcAuthInfo.AuthFlavor flavor) : base(flavor) { }
protected internal Credentials(RpcAuthInfo.AuthFlavor flavor) : base(flavor) { }