예제 #1
0
        public IdentityActor(ActorKey actorKey, IActorManager actorManager, IIdentityStore identityRepository)
            : base(actorKey, actorManager)
        {
            Verify.IsNotNull(nameof(identityRepository), identityRepository);

            _identityRepository = identityRepository;
        }
예제 #2
0
 public Identities(IIdentityStore source, INames alias, ITypeFormatter formatter, IIdentifiers identifiers)
 {
     _source      = source;
     _alias       = alias;
     _formatter   = formatter;
     _identifiers = identifiers;
 }
예제 #3
0
 TypeIdentityRegistrations(Func <TypeInfo, IEnumerable <TypeInfo> > types, ITypeIdentity identity,
                           IIdentityStore store, INamespaceFormatter formatter)
 {
     _types     = types;
     _identity  = identity;
     _store     = store;
     _formatter = formatter;
 }
 public FormatWriters(IAliases table, IIdentifierFormatter formatter, IIdentityStore store,
                      ITypePartResolver parts)
 {
     _table     = table;
     _formatter = formatter;
     _store     = store;
     _parts     = parts;
 }
 public Classification(IFormattedContentSpecification specification, IIdentityStore identities, IGenericTypes generic,
                       ITypes types)
 {
     _specification = specification;
     _identities    = identities;
     _generic       = generic;
     _types         = types;
 }
예제 #6
0
        public UsersAdminController(ApplicationUserManager userManager, ApplicationRoleManager roleManager, IIdentityStore identityStore)
        {
            UserManager = userManager;
            RoleManager = roleManager;

            _identityStore = identityStore;
            //Clear cache
            CachingHelpers.ClearUserCache();
        }
예제 #7
0
파일: Program.cs 프로젝트: muffadalis/Stash
 public SlowWriter(IAliases aliases, IIdentifierFormatter formatter, IIdentityStore store, ITypePartResolver parts,
                   System.Xml.XmlWriter writer)
 {
     _aliases   = aliases;
     _formatter = formatter;
     _store     = store;
     _parts     = parts;
     _writer    = writer;
     _selector  = Get;
 }
        public IdentificationMiddleware(
            IIdentityStore identityStore,
            IIdentityDirectory identityDirectory,
            ITokenStore tokenStore)
        {
            _identityStore     = identityStore;
            _identityDirectory = identityDirectory;
            _tokenStore        = tokenStore;

            this.RunAfter <ISession>(null, false);
        }
예제 #9
0
 // ReSharper disable once TooManyDependencies
 public MemberSerializers(IAttributeSpecifications runtime, IMemberAccessors accessors,
                          IMemberConverters converters, IMemberContents content, IIdentityStore identities,
                          ITypes types, IIdentifiers identifiers)
 {
     _runtime     = runtime;
     _accessors   = accessors;
     _converters  = converters;
     _content     = content;
     _identities  = identities;
     _types       = types;
     _identifiers = identifiers;
 }
        public void Setup()
        {
            var mockProducer = new MockProducer();

            _mockIdentityDirectory = new MockIdentityDirectory();
            _identityDirectory     = _mockIdentityDirectory.GetImplementation <IIdentityDirectory>(mockProducer);
            mockProducer.Add(_identityDirectory);

            _mockIdentityStore = new MockIdentityStore();
            _identityStore     = _mockIdentityStore.GetImplementation <IIdentityStore>(mockProducer);
            mockProducer.Add(_identityStore);
        }
 public XmlWriter(IAliases aliases, IIdentifierFormatter formatter, IIdentityStore store,
                  ITypePartResolver parts, IPrefix prefixes,
                  System.Xml.XmlWriter writer, Delimiter separator)
 {
     _aliases   = aliases;
     _formatter = formatter;
     _store     = store;
     _parts     = parts;
     _prefixes  = prefixes;
     _writer    = writer;
     _separator = separator;
     _selector  = Get;
 }
예제 #12
0
 public MyAccountController(ApplicationUserManager userManager, IIdentityStore identityStore, IActivityStore activityStore)
 {
     UserManager    = userManager;
     _identityStore = identityStore;
     _activityStore = activityStore;
 }
예제 #13
0
 public MyAccountController(IIdentityStore identityStore, IActivityStore activityStore)
 {
     _identityStore = identityStore;
     _activityStore = activityStore;
 }
예제 #14
0
 public FormatReaderContexts(IIdentityStore store, ITypes types, IXmlParserContexts contexts)
 {
     _store    = store;
     _contexts = contexts;
     _types    = types;
 }
 public TypePartMapper(IIdentityStore store)
 {
     _store    = store;
     _selector = Get;
 }
예제 #16
0
 public UsersAdminController(IIdentityStore identityStore)
 {
     _identityStore = identityStore;
     //Clear cache
     CachingHelpers.ClearUserCache();
 }
예제 #17
0
			public ArrayElement(IIdentities identities, IIdentityStore store, ICollectionItemTypeLocator locator)
			{
				_identities = identities;
				_store      = store;
				_locator    = locator;
			}
예제 #18
0
			public Types(ITypes types, IIdentityStore store)
			{
				_types = types;
				_store = store;
			}
예제 #19
0
 public Composer(IIdentityStore store) : this(store.Get("Name", string.Empty))
 {
 }
예제 #20
0
 public UsersController()
 {
     identityStore = new SimpleIdentityStore();
 }
예제 #21
0
 public TypeIdentityRegistrations(IDiscoveredTypes types, ITypeIdentity identity, IIdentityStore store,
                                  INamespaceFormatter formatter)
     : this(types.To(EnumerableCoercer <TypeInfo> .Default).ToSelectionDelegate(), identity, store, formatter)
 {
 }
예제 #22
0
 public FormatWriters(IIdentifierFormatter formatter, IIdentityStore store, ITypePartResolver parts,
                      IPrefixes prefixes)
     : this(Aliases, formatter, store, parts, prefixes)
 {
 }
예제 #23
0
 public IdentityMapper(IIdentityStore store, XmlNamespaceManager manager)
 {
     _store   = store;
     _manager = manager;
 }
 public TypePartReflector(IIdentityStore identities, ITypes types) : base(TypePartsEqualityComparer.Default)
 {
     _identities = identities;
     _types      = types;
 }
예제 #25
0
 public FormatReaderContext(IIdentityStore store, IParser <MemberInfo> parser, IDisposable disposable)
 {
     _store      = store;
     _parser     = parser;
     _disposable = disposable;
 }
예제 #26
0
 public XmlWriter(IAliases aliases, IIdentifierFormatter formatter, IIdentityStore store, ITypePartResolver parts,
                  System.Xml.XmlWriter writer)
     : this(aliases, formatter, store, parts, writer, DefaultSeparator)
 {
 }
예제 #27
0
			public ArrayElement(IIdentities identities, IIdentityStore store)
				: this(identities, store, CollectionItemTypeLocator.Default) {}
예제 #28
0
 public FormatReaderContext(IIdentityStore store, IParser <MemberInfo> parser)
 {
     _store  = store;
     _parser = parser;
 }
예제 #29
0
 public Identities(IIdentifiers identifiers, IIdentityStore source, INames names)
     : this(source, names, TypeNameFormatter, identifiers)
 {
 }
예제 #30
0
 public FormatReaderContexts(IIdentityStore store, ITypes types) :
     this(store, types, XmlParserContexts.Default)
 {
 }
예제 #31
0
 public TokenInspector(IIdentityStore identityStore)
 {
     this.identityStore = identityStore;
 }
 public void StoreSetup()
 {
     Guid userIdentifier = Guid.NewGuid();
     this.fakeUserFromDb = new IdentityUser
                               {
                                   Id = userIdentifier,
                                   EmailAddress = RandomData.GetEmailAddress(),
                                   PasswordHash =
                                       RandomData.GetString(18, 24, RandomData.StringIncludes.Lowercase | RandomData.StringIncludes.Numbers) + "==",
                                   FirstName = RandomData.GetStringPersonFirstName(),
                                   LastName = RandomData.GetStringPersonLastName(),
                                   IsConfirmed = true,
                                   CreatedDate = RandomData.GetDateTimeInPast(),
                                   SecurityStamp = Guid.NewGuid().ToString("D"),
                                   Logins =
                                       new List<IdentityUserLogin>
                                           {
                                               new IdentityUserLogin
                                                   {
                                                       LoginProvider = "Yahoo",
                                                       ProviderKey = RandomData.GetStringNumber(18),
                                                       UserId = userIdentifier
                                                   }
                                           },
                                   Roles = new List<IdentityUserRole>(),
                                   Claims =
                                       new List<IdentityUserClaim>
                                           {
                                               new IdentityUserClaim
                                                   {
                                                       ClaimId = RandomData.GetInteger(1000, 9999),
                                                       ClaimType = "FavoriteActress",
                                                       ClaimValue = "Sandra Bullock",
                                                       UserId = userIdentifier
                                                   }
                                           }
                               };
     List<IdentityUser> userList = new List<IdentityUser> { this.fakeUserFromDb };
     var role = new IdentityUserRole { RoleId = RandomData.GetInteger(1000, 9999), RoleName = RandomData.GetStringWord(), Users = userList };
     this.fakeUserFromDb.Roles.Add(role);
     this.dbHelperMock = new Mock<ISecurityDataHelper>();
     this.dbHelperMock.Setup(mock => mock.GetUserAggregate(It.IsAny<Expression<Func<IdentityUser, bool>>>()))
         .Returns<Expression<Func<IdentityUser, bool>>>(predicate => userList.FirstOrDefault(predicate.Compile()));
     this.dbHelperMock.Setup(mock => mock.GetById<IdentityUser, Guid>(It.IsAny<Guid>())).Returns((Guid userId) => userList.FirstOrDefault(u => u.Id == userId));
     this.store = new IdentityStore<ApplicationUser>(this.dbHelperMock.Object);
 }