public AuthenticateResult(ClaimsPrincipal user) { if (user == null) { throw new ArgumentNullException("user"); } User = IdentityServerPrincipal.CreateFromPrincipal(user, Constants.PrimaryAuthenticationType); }
internal AuthenticateResult(ClaimsPrincipal user) { if (user == null) { throw new ArgumentNullException(nameof(user)); } this.User = IdentityServerPrincipal.CreateFromPrincipal(user, Constants.PrimaryAuthenticationType); }
public AuthenticateResult(string redirectPath, ClaimsPrincipal user) { if (redirectPath.IsMissing()) { throw new ArgumentNullException("redirectPath"); } if (!redirectPath.StartsWith("~/") && !redirectPath.StartsWith("/")) { throw new ArgumentException("redirectPath must start with / or ~/"); } if (user == null) { throw new ArgumentNullException("user"); } this.PartialSignInRedirectPath = redirectPath; User = IdentityServerPrincipal.CreateFromPrincipal(user, Constants.PartialSignInAuthenticationType); }