Beispiel #1
0
 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);
 }
Beispiel #2
0
 /// <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);
 }
Beispiel #3
0
 protected internal RpcAuthInfo(RpcAuthInfo.AuthFlavor flavor)
 {
     this.flavor = flavor;
 }
Beispiel #4
0
 protected internal Verifier(RpcAuthInfo.AuthFlavor flavor)
     : base(flavor)
 {
 }
Beispiel #5
0
 protected internal Credentials(RpcAuthInfo.AuthFlavor flavor)
     : base(flavor)
 {
 }