Exemple #1
0
 public KerberosSecurityTokenProvider(string servicePrincipalName, System.Security.Principal.TokenImpersonationLevel tokenImpersonationLevel, System.Net.NetworkCredential networkCredential)
 {
     if (servicePrincipalName == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("servicePrincipalName");
     }
     if ((tokenImpersonationLevel != System.Security.Principal.TokenImpersonationLevel.Identification) && (tokenImpersonationLevel != System.Security.Principal.TokenImpersonationLevel.Impersonation))
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("tokenImpersonationLevel", System.IdentityModel.SR.GetString("ImpersonationLevelNotSupported", new object[] { tokenImpersonationLevel })));
     }
     this.servicePrincipalName    = servicePrincipalName;
     this.tokenImpersonationLevel = tokenImpersonationLevel;
     this.networkCredential       = networkCredential;
 }
 public KerberosSecurityTokenProvider(string servicePrincipalName, System.Security.Principal.TokenImpersonationLevel tokenImpersonationLevel, System.Net.NetworkCredential networkCredential)
 {
     if (servicePrincipalName == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("servicePrincipalName");
     }
     if ((tokenImpersonationLevel != System.Security.Principal.TokenImpersonationLevel.Identification) && (tokenImpersonationLevel != System.Security.Principal.TokenImpersonationLevel.Impersonation))
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("tokenImpersonationLevel", System.IdentityModel.SR.GetString("ImpersonationLevelNotSupported", new object[] { tokenImpersonationLevel })));
     }
     this.servicePrincipalName = servicePrincipalName;
     this.tokenImpersonationLevel = tokenImpersonationLevel;
     this.networkCredential = networkCredential;
 }
Exemple #3
0
 public KerberosSecurityTokenProvider(string servicePrincipalName, System.Security.Principal.TokenImpersonationLevel tokenImpersonationLevel) : this(servicePrincipalName, tokenImpersonationLevel, null)
 {
 }