public AccountController()
 {
     IdentityManager = new IdentityManager(new CustomIdentityStore(
         new IdentityDbContext<CustomUser, 
                               CustomUserClaim, 
                               CustomUserSecret, 
                               CustomUserLogin,
                               CustomRole, 
                               CustomUserRole, 
                               CustomToken, 
                               CustomUserManagement>()
     ));
     AuthenticationManager = new AuthenticationManager(new IdentityAuthenticationOptions(), IdentityManager);
 }
 public ChallengeResult(string provider, string redirectUrl, AuthenticationManager manager)
 {
     LoginProvider = provider;
     RedirectUrl = redirectUrl;
     Manager = manager;
 }
 public AccountController(IdentityManager storeManager, AuthenticationManager authManager)
 {
     IdentityManager = storeManager;
     AuthenticationManager = authManager;
 }
 public AccountController() 
 {
     IdentityManager = new IdentityManager(new IdentityStore());
     AuthenticationManager = new AuthenticationManager(new IdentityAuthenticationOptions(), IdentityManager);
 }
Esempio n. 5
0
        public static Task<IList<Claim>> GetClaimsAsync(IdentityManager identityManager, string userId)
        {
            if (identityManager == null)
            {
                throw new ArgumentNullException("identityManager");
            }

            AuthenticationManager authenticationManager = new AuthenticationManager(
                identityManager.Settings.GetAuthenticationOptions(), identityManager);

            return authenticationManager.GetUserIdentityClaimsAsync(userId, new Claim[0], CancellationToken.None);
        }