public CredentialPrincipal(CredentialIdentity identity, params string[] roles)
		{
			if(identity == null)
				throw new ArgumentNullException("identity");

			_identity = identity;
			_roles = roles;
		}
Example #2
0
        public CredentialPrincipal(Credential credential, params string[] roles)
        {
            _identity = new CredentialIdentity(credential);

            if (roles != null && roles.Length > 0)
            {
                _roles = new HashSet <string>(roles, StringComparer.OrdinalIgnoreCase);
            }
        }
Example #3
0
        public CredentialPrincipal(CredentialIdentity identity, params string[] roles)
        {
            if (identity == null)
            {
                throw new ArgumentNullException("identity");
            }

            _identity = identity;
            _roles    = roles;
        }