Exemple #1
0
 public AuthenticateResult(ClaimsPrincipal user)
 {
     if (user == null)
     {
         throw new ArgumentNullException("user");
     }
     User = IdentityServerPrincipal.CreateFromPrincipal(user, Constants.PrimaryAuthenticationType);
 }
Exemple #2
0
 internal AuthenticateResult(ClaimsPrincipal user)
 {
     if (user == null)
     {
         throw new ArgumentNullException(nameof(user));
     }
     this.User = IdentityServerPrincipal.CreateFromPrincipal(user, Constants.PrimaryAuthenticationType);
 }
Exemple #3
0
        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);
        }