public IdentityPrincipal(PrincipalId principalId, IdentityPrincipalType principalType) { Verify.IsNotEmpty(nameof(principalId), principalId); PrincipalId = principalId; PrincipalType = principalType; _properties = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase); }
public IdentityPrincipal(PrincipalId clientId, IdentityPrincipalType principalType, ApiKey apiKey, IEnumerable <KeyValuePair <string, string> > properties) { Verify.IsNotEmpty(nameof(clientId), clientId); PrincipalId = clientId; PrincipalType = principalType; ApiKey = apiKey; properties = properties ?? Enumerable.Empty <KeyValuePair <string, string> >(); _properties = properties.ToDictionary(x => x.Key, x => x.Value, StringComparer.OrdinalIgnoreCase); }