protected void LoginUser(UserInformation userInformation) { // Create and attach a claims based principal to the current thread Thread.CurrentPrincipal = userInformation.ToClaimsPrincipal(); }
protected void LoginUser(string userName, string[] roleNames, UserInformation userInformation) { // Create and attach a claims based principal to the current thread Thread.CurrentPrincipal = userInformation.ToClaimsPrincipal(userName, roleNames); }
protected void LoginUser(UserInformation userInformation) { Thread.CurrentPrincipal = userInformation.ToClaimsPrincipal(); }
protected override void EstablishContext() { base.EstablishContext(); staffStudentAssociationRepository = mocks.StrictMock<IRepository<StaffStudentAssociation>>(); rootMetricNodeResolver = mocks.StrictMock<IRootMetricNodeResolver>(); currentUserClaimInterrogator = mocks.StrictMock<ICurrentUserClaimInterrogator>(); windsorContainer = new WindsorContainer(); RegisterProviders(windsorContainer); userEntryProvider = windsorContainer.Resolve<IUserEntryProvider>(); var suppliedUserInformation = new UserInformation { StaffUSI = suppliedStaffUSI, AssociatedOrganizations = new List<UserInformation.EducationOrganization>() { new UserInformation.School(suppliedLocalEducationAgencyId, suppliedSchoolId) { ClaimTypes = new List<string> { EdFiClaimTypes.ViewAllTeachers } } } }; Thread.CurrentPrincipal = suppliedUserInformation.ToClaimsPrincipal(); }