UnconditionalPolicy(UnconditionalPolicy from) { this.disposable = from.disposable; this.primaryIdentity = from.disposable ? SecurityUtils.CloneIdentityIfNecessary(from.primaryIdentity) : from.primaryIdentity; if (from.issuance != null) { this.issuance = from.disposable ? SecurityUtils.CloneClaimSetIfNecessary(from.issuance) : from.issuance; } else { this.issuances = from.disposable ? SecurityUtils.CloneClaimSetsIfNecessary(from.issuances) : from.issuances; } this.issuer = from.issuer; this.expirationTime = from.expirationTime; }
private UnconditionalPolicy(UnconditionalPolicy from) { _disposable = from._disposable; _primaryIdentity = from._disposable ? SecurityUtils.CloneIdentityIfNecessary(from._primaryIdentity) : from._primaryIdentity; if (from._issuance != null) { _issuance = from._disposable ? SecurityUtils.CloneClaimSetIfNecessary(from._issuance) : from._issuance; } else { _issuances = from._disposable ? SecurityUtils.CloneClaimSetsIfNecessary(from._issuances) : from._issuances; } _issuer = from._issuer; _expirationTime = from._expirationTime; }
private UnconditionalPolicy(UnconditionalPolicy from) { this.disposable = from.disposable; this.primaryIdentity = from.disposable ? System.IdentityModel.SecurityUtils.CloneIdentityIfNecessary(from.primaryIdentity) : from.primaryIdentity; if (from.issuance != null) { this.issuance = from.disposable ? System.IdentityModel.SecurityUtils.CloneClaimSetIfNecessary(from.issuance) : from.issuance; } else { this.issuances = from.disposable ? System.IdentityModel.SecurityUtils.CloneClaimSetsIfNecessary(from.issuances) : from.issuances; } this.issuer = from.issuer; this.expirationTime = from.expirationTime; }
public SimpleAuthorizationContext(IList<IAuthorizationPolicy> authorizationPolicies) { this.policy = (UnconditionalPolicy) authorizationPolicies[0]; Dictionary<string, object> dictionary = new Dictionary<string, object>(); if ((this.policy.PrimaryIdentity != null) && (this.policy.PrimaryIdentity != System.IdentityModel.SecurityUtils.AnonymousIdentity)) { List<IIdentity> list = new List<IIdentity> { this.policy.PrimaryIdentity }; dictionary.Add("Identities", list); } this.properties = dictionary; }