├── .gitignore ├── LICENSE.md ├── README.md └── src ├── .nuget ├── NuGet.Config ├── NuGet.exe ├── NuGet.targets └── packages.config ├── FlexProviders.EF ├── App.config ├── FlexMembershipUserStore.cs ├── FlexProviders.EF.csproj ├── FlexRoleStore.cs ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── FlexProviders.Mongo ├── FlexMembershipUserStore.cs ├── FlexProviders.Mongo.csproj ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── FlexProviders.Raven ├── FlexMembershipUserStore.cs ├── FlexProviders.Raven.csproj ├── FlexProviders.Raven.nuspec ├── Properties │ └── AssemblyInfo.cs └── packages.config ├── FlexProviders.Tests.EF ├── App.config ├── FlexProviders.Tests.EF.csproj ├── IntegrationTest.cs ├── Membership │ ├── ChangePasswordTests.cs │ ├── CreateAccountTests.cs │ └── Login_Tests.cs ├── Migrations │ └── Configuration.cs ├── OAuth │ ├── CreateUpdateAccountTests.cs │ ├── DeleteAccountTests.cs │ └── GetUserNameTests.cs ├── Properties │ └── AssemblyInfo.cs ├── Role.cs ├── RoleStore.cs ├── Roles │ ├── CreateRoles.cs │ ├── DeleteRoles.cs │ └── QueryRoles.cs ├── SomeDb.cs ├── TestDB.cs ├── User.cs ├── UserStore.cs └── packages.config ├── FlexProviders.Tests.Mongo ├── FlexProviders.Tests.Mongo.csproj ├── Properties │ └── AssemblyInfo.cs ├── app.config └── packages.config ├── FlexProviders.Tests.Raven ├── FlexProviders.Tests.Raven.csproj ├── IntegrationTest.cs ├── Membership │ ├── ChangePasswordTests.cs │ ├── CreateAccountTests.cs │ └── LoginTests.cs ├── OAuth │ ├── CreateUpdateAccountTests.cs │ ├── DeleteAccountTests.cs │ └── GetUserNameTests.cs ├── Properties │ └── AssemblyInfo.cs ├── Role.cs ├── Roles │ ├── CreateRoles.cs │ ├── DeleteRoles.cs │ └── QueryRoles.cs ├── User.cs ├── app.config └── packages.config ├── FlexProviders.Tests ├── FlexProviders.Tests.csproj ├── Integration │ ├── EF │ │ └── OAuth │ │ │ ├── CreateUpdateAccountTests.cs │ │ │ ├── DeleteAccountTests.cs │ │ │ └── GetUserNameTests.cs │ ├── FakeApplicationEnvironment.cs │ └── Raven │ │ ├── IntegrationTest.cs │ │ └── OAuth │ │ ├── CreateUpdateAccountTests.cs │ │ ├── DeleteAccountTests.cs │ │ └── GetUserNameTests.cs ├── Properties │ └── AssemblyInfo.cs ├── Security │ └── Encryption │ │ └── EncryptorTests.cs ├── app.config └── packages.config ├── FlexProviders ├── Aspnet │ └── AspnetEnvironment.cs ├── FlexProviders.csproj ├── Membership │ ├── FlexMembershipException.cs │ ├── FlexMembershipProvider.cs │ ├── FlexMembershipStatus.cs │ ├── FlexOAuthAccount.cs │ ├── FlexPrincipal.cs │ ├── FlexPrincipalSerializeModel.cs │ ├── IApplicationEnvironment.cs │ ├── IFlexMembershipProvider.cs │ ├── IFlexMembershipUser.cs │ ├── IFlexOAuthProvider.cs │ ├── IFlexPrincipal.cs │ ├── IFlexUserStore.cs │ └── ISecurityEncoder.cs ├── Properties │ └── AssemblyInfo.cs ├── Roles │ ├── FlexRoleProvider.cs │ ├── IFlexRole.cs │ ├── IFlexRoleProvider.cs │ └── IFlexRoleStore.cs └── packages.config ├── Memflex.sln ├── Sample.Mongo ├── App_Start │ ├── AuthConfig.cs │ ├── BundleConfig.cs │ ├── FilterConfig.cs │ ├── RouteConfig.cs │ ├── StructuremapMvc.cs │ └── WebApiConfig.cs ├── Content │ ├── Site.css │ └── themes │ │ └── base │ │ ├── images │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_888888_256x240.png │ │ └── ui-icons_cd0a0a_256x240.png │ │ ├── jquery-ui.css │ │ ├── jquery.ui.accordion.css │ │ ├── jquery.ui.all.css │ │ ├── jquery.ui.autocomplete.css │ │ ├── jquery.ui.base.css │ │ ├── jquery.ui.button.css │ │ ├── jquery.ui.core.css │ │ ├── jquery.ui.datepicker.css │ │ ├── jquery.ui.dialog.css │ │ ├── jquery.ui.progressbar.css │ │ ├── jquery.ui.resizable.css │ │ ├── jquery.ui.selectable.css │ │ ├── jquery.ui.slider.css │ │ ├── jquery.ui.tabs.css │ │ ├── jquery.ui.theme.css │ │ └── minified │ │ ├── images │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_888888_256x240.png │ │ └── ui-icons_cd0a0a_256x240.png │ │ ├── jquery-ui.min.css │ │ ├── jquery.ui.accordion.min.css │ │ ├── jquery.ui.autocomplete.min.css │ │ ├── jquery.ui.button.min.css │ │ ├── jquery.ui.core.min.css │ │ ├── jquery.ui.datepicker.min.css │ │ ├── jquery.ui.dialog.min.css │ │ ├── jquery.ui.progressbar.min.css │ │ ├── jquery.ui.resizable.min.css │ │ ├── jquery.ui.selectable.min.css │ │ ├── jquery.ui.slider.min.css │ │ ├── jquery.ui.tabs.min.css │ │ └── jquery.ui.theme.min.css ├── Controllers │ ├── AccountController.cs │ ├── AdminController.cs │ └── HomeController.cs ├── DependencyResolution │ ├── IoC.cs │ ├── SmFilterProvider.cs │ ├── StructureMapDependencyResolver.cs │ └── StructureMapDependencyScope.cs ├── Filters │ └── FlexAuthorizeAttribute.cs ├── Global.asax ├── Global.asax.cs ├── Images │ ├── accent.png │ ├── bullet.png │ ├── heroAccent.png │ ├── orderedList0.png │ ├── orderedList1.png │ ├── orderedList2.png │ ├── orderedList3.png │ ├── orderedList4.png │ ├── orderedList5.png │ ├── orderedList6.png │ ├── orderedList7.png │ ├── orderedList8.png │ └── orderedList9.png ├── LogMeIn.Mongo.csproj ├── Models │ ├── AccountModels.cs │ ├── Movie.cs │ ├── Role.cs │ └── User.cs ├── Properties │ └── AssemblyInfo.cs ├── Scripts │ ├── _references.js │ ├── jquery-1.7.1.intellisense.js │ ├── jquery-1.7.1.js │ ├── jquery-1.7.1.min.js │ ├── jquery-ui-1.8.20.js │ ├── jquery-ui-1.8.20.min.js │ ├── jquery.unobtrusive-ajax.js │ ├── jquery.unobtrusive-ajax.min.js │ ├── jquery.validate-vsdoc.js │ ├── jquery.validate.js │ ├── jquery.validate.min.js │ ├── jquery.validate.unobtrusive.js │ ├── jquery.validate.unobtrusive.min.js │ ├── knockout-2.1.0.debug.js │ ├── knockout-2.1.0.js │ └── modernizr-2.5.3.js ├── Security │ ├── IUserProfileManager.cs │ ├── IWebSecurity.cs │ ├── ManageMessageId.cs │ ├── UserProfileManager.cs │ └── WebMatrixSecurity.cs ├── Views │ ├── Account │ │ ├── ChangeForgottenPassword.cshtml │ │ ├── ExternalLoginConfirmation.cshtml │ │ ├── ExternalLoginFailure.cshtml │ │ ├── ForgotPassword.cshtml │ │ ├── Login.cshtml │ │ ├── Manage.cshtml │ │ ├── Register.cshtml │ │ ├── _ChangePasswordPartial.cshtml │ │ ├── _ExternalLoginsListPartial.cshtml │ │ ├── _RemoveExternalLoginsPartial.cshtml │ │ └── _SetPasswordPartial.cshtml │ ├── Home │ │ ├── About.cshtml │ │ ├── Contact.cshtml │ │ ├── Create.cshtml │ │ ├── Delete.cshtml │ │ ├── Details.cshtml │ │ ├── Edit.cshtml │ │ └── Index.cshtml │ ├── Shared │ │ ├── Error.cshtml │ │ ├── _Layout.cshtml │ │ └── _LoginPartial.cshtml │ ├── Web.config │ └── _ViewStart.cshtml ├── Web.Debug.config ├── Web.Release.config ├── Web.config ├── favicon.ico └── packages.config ├── Sample.Raven ├── App_Start │ ├── AuthConfig.cs │ ├── BundleConfig.cs │ ├── FilterConfig.cs │ ├── NinjectWebCommon.cs │ ├── RouteConfig.cs │ └── WebApiConfig.cs ├── Content │ ├── Site.css │ └── themes │ │ └── base │ │ ├── images │ │ ├── animated-overlay.gif │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_888888_256x240.png │ │ └── ui-icons_cd0a0a_256x240.png │ │ ├── jquery-ui.css │ │ ├── jquery.ui.accordion.css │ │ ├── jquery.ui.all.css │ │ ├── jquery.ui.autocomplete.css │ │ ├── jquery.ui.base.css │ │ ├── jquery.ui.button.css │ │ ├── jquery.ui.core.css │ │ ├── jquery.ui.datepicker.css │ │ ├── jquery.ui.dialog.css │ │ ├── jquery.ui.menu.css │ │ ├── jquery.ui.progressbar.css │ │ ├── jquery.ui.resizable.css │ │ ├── jquery.ui.selectable.css │ │ ├── jquery.ui.slider.css │ │ ├── jquery.ui.spinner.css │ │ ├── jquery.ui.tabs.css │ │ ├── jquery.ui.theme.css │ │ ├── jquery.ui.tooltip.css │ │ └── minified │ │ ├── images │ │ ├── animated-overlay.gif │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_888888_256x240.png │ │ └── ui-icons_cd0a0a_256x240.png │ │ ├── jquery-ui.min.css │ │ ├── jquery.ui.accordion.min.css │ │ ├── jquery.ui.autocomplete.min.css │ │ ├── jquery.ui.button.min.css │ │ ├── jquery.ui.core.min.css │ │ ├── jquery.ui.datepicker.min.css │ │ ├── jquery.ui.dialog.min.css │ │ ├── jquery.ui.menu.min.css │ │ ├── jquery.ui.progressbar.min.css │ │ ├── jquery.ui.resizable.min.css │ │ ├── jquery.ui.selectable.min.css │ │ ├── jquery.ui.slider.min.css │ │ ├── jquery.ui.spinner.min.css │ │ ├── jquery.ui.tabs.min.css │ │ ├── jquery.ui.theme.min.css │ │ └── jquery.ui.tooltip.min.css ├── Controllers │ ├── AccountController.cs │ ├── AdminController.cs │ └── HomeController.cs ├── DependencyResolution │ └── RavenModule.cs ├── Filters │ └── FlexAuthorizeAttribute.cs ├── Global.asax ├── Global.asax.cs ├── Images │ ├── accent.png │ ├── bullet.png │ ├── heroAccent.png │ ├── orderedList0.png │ ├── orderedList1.png │ ├── orderedList2.png │ ├── orderedList3.png │ ├── orderedList4.png │ ├── orderedList5.png │ ├── orderedList6.png │ ├── orderedList7.png │ ├── orderedList8.png │ └── orderedList9.png ├── LogMeIn.Raven.csproj ├── Models │ ├── AccountModels.cs │ ├── Role.cs │ └── User.cs ├── Properties │ └── AssemblyInfo.cs ├── Scripts │ ├── _references.js │ ├── jquery-1.9.0.intellisense.js │ ├── jquery-1.9.0.js │ ├── jquery-1.9.0.min.js │ ├── jquery-1.9.0.min.map │ ├── jquery-ui-1.10.0.js │ ├── jquery-ui-1.10.0.min.js │ ├── jquery.unobtrusive-ajax.js │ ├── jquery.unobtrusive-ajax.min.js │ ├── jquery.validate-vsdoc.js │ ├── jquery.validate.js │ ├── jquery.validate.min.js │ ├── jquery.validate.unobtrusive.js │ ├── jquery.validate.unobtrusive.min.js │ ├── knockout-2.2.1.debug.js │ ├── knockout-2.2.1.js │ └── modernizr-2.6.2.js ├── Security │ └── ManageMessageId.cs ├── Views │ ├── Account │ │ ├── ChangeForgottenPassword.cshtml │ │ ├── ExternalLoginConfirmation.cshtml │ │ ├── ExternalLoginFailure.cshtml │ │ ├── ForgotPassword.cshtml │ │ ├── Login.cshtml │ │ ├── Manage.cshtml │ │ ├── Register.cshtml │ │ ├── _ChangePasswordPartial.cshtml │ │ ├── _ExternalLoginsListPartial.cshtml │ │ ├── _RemoveExternalLoginsPartial.cshtml │ │ └── _SetPasswordPartial.cshtml │ ├── Home │ │ └── Index.cshtml │ ├── Shared │ │ ├── Error.cshtml │ │ ├── _Layout.cshtml │ │ └── _LoginPartial.cshtml │ ├── Web.config │ └── _ViewStart.cshtml ├── Web.Debug.config ├── Web.Release.config ├── Web.config ├── favicon.ico └── packages.config └── Sample ├── App_Start ├── AuthConfig.cs ├── BundleConfig.cs ├── FilterConfig.cs ├── RouteConfig.cs ├── StructuremapMvc.cs └── WebApiConfig.cs ├── Content ├── Site.css └── themes │ └── base │ ├── images │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ ├── ui-bg_flat_75_ffffff_40x100.png │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ ├── ui-bg_glass_65_ffffff_1x400.png │ ├── ui-bg_glass_75_dadada_1x400.png │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ ├── ui-bg_glass_95_fef1ec_1x400.png │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png │ ├── ui-icons_222222_256x240.png │ ├── ui-icons_2e83ff_256x240.png │ ├── ui-icons_454545_256x240.png │ ├── ui-icons_888888_256x240.png │ └── ui-icons_cd0a0a_256x240.png │ ├── jquery-ui.css │ ├── jquery.ui.accordion.css │ ├── jquery.ui.all.css │ ├── jquery.ui.autocomplete.css │ ├── jquery.ui.base.css │ ├── jquery.ui.button.css │ ├── jquery.ui.core.css │ ├── jquery.ui.datepicker.css │ ├── jquery.ui.dialog.css │ ├── jquery.ui.progressbar.css │ ├── jquery.ui.resizable.css │ ├── jquery.ui.selectable.css │ ├── jquery.ui.slider.css │ ├── jquery.ui.tabs.css │ ├── jquery.ui.theme.css │ └── minified │ ├── images │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ ├── ui-bg_flat_75_ffffff_40x100.png │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ ├── ui-bg_glass_65_ffffff_1x400.png │ ├── ui-bg_glass_75_dadada_1x400.png │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ ├── ui-bg_glass_95_fef1ec_1x400.png │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png │ ├── ui-icons_222222_256x240.png │ ├── ui-icons_2e83ff_256x240.png │ ├── ui-icons_454545_256x240.png │ ├── ui-icons_888888_256x240.png │ └── ui-icons_cd0a0a_256x240.png │ ├── jquery-ui.min.css │ ├── jquery.ui.accordion.min.css │ ├── jquery.ui.autocomplete.min.css │ ├── jquery.ui.button.min.css │ ├── jquery.ui.core.min.css │ ├── jquery.ui.datepicker.min.css │ ├── jquery.ui.dialog.min.css │ ├── jquery.ui.progressbar.min.css │ ├── jquery.ui.resizable.min.css │ ├── jquery.ui.selectable.min.css │ ├── jquery.ui.slider.min.css │ ├── jquery.ui.tabs.min.css │ └── jquery.ui.theme.min.css ├── Controllers ├── AccountController.cs ├── AdminController.cs └── HomeController.cs ├── DependencyResolution ├── IoC.cs ├── SmDependencyResolver.cs └── SmFilterProvider.cs ├── Filters └── FlexAuthorizeAttribute.cs ├── Global.asax ├── Global.asax.cs ├── Images ├── accent.png ├── bullet.png ├── heroAccent.png ├── orderedList0.png ├── orderedList1.png ├── orderedList2.png ├── orderedList3.png ├── orderedList4.png ├── orderedList5.png ├── orderedList6.png ├── orderedList7.png ├── orderedList8.png └── orderedList9.png ├── LogMeIn.csproj ├── Migrations ├── 201209221621381_Create.Designer.cs ├── 201209221621381_Create.cs ├── 201209221621381_Create.resx └── Configuration.cs ├── Models ├── AccountModels.cs ├── ManageMessageId.cs ├── Movie.cs ├── MovieDb.cs ├── Role.cs ├── RoleStore.cs ├── User.cs └── UserStore.cs ├── Properties └── AssemblyInfo.cs ├── Scripts ├── _references.js ├── jquery-1.7.1.intellisense.js ├── jquery-1.7.1.js ├── jquery-1.7.1.min.js ├── jquery-ui-1.8.20.js ├── jquery-ui-1.8.20.min.js ├── jquery.unobtrusive-ajax.js ├── jquery.unobtrusive-ajax.min.js ├── jquery.validate-vsdoc.js ├── jquery.validate.js ├── jquery.validate.min.js ├── jquery.validate.unobtrusive.js ├── jquery.validate.unobtrusive.min.js ├── knockout-2.1.0.debug.js ├── knockout-2.1.0.js └── modernizr-2.5.3.js ├── Views ├── Account │ ├── ExternalLoginConfirmation.cshtml │ ├── ExternalLoginFailure.cshtml │ ├── Login.cshtml │ ├── Manage.cshtml │ ├── Register.cshtml │ ├── _ChangePasswordPartial.cshtml │ ├── _ExternalLoginsListPartial.cshtml │ ├── _RemoveExternalLoginsPartial.cshtml │ └── _SetPasswordPartial.cshtml ├── Home │ ├── About.cshtml │ ├── Contact.cshtml │ ├── Create.cshtml │ ├── Delete.cshtml │ ├── Details.cshtml │ ├── Edit.cshtml │ └── Index.cshtml ├── Shared │ ├── Error.cshtml │ ├── _Layout.cshtml │ └── _LoginPartial.cshtml ├── Web.config └── _ViewStart.cshtml ├── Web.Debug.config ├── Web.Release.config ├── Web.config ├── favicon.ico └── packages.config /.gitignore: -------------------------------------------------------------------------------- 1 | *resharper.user 2 | [Dd]ebug/ 3 | [Rr]elease/ 4 | build/ 5 | [Bb]in/ 6 | [Oo]bj/ 7 | *.suo 8 | *.mdf 9 | *.ldf 10 | .vs/ 11 | *.sln.cache 12 | _ReSharper.*/ 13 | *.resharper 14 | resharper.settings.xml 15 | *.user 16 | [Bb]uild* 17 | [Dd]ist 18 | junit-report 19 | junit 20 | ProfilerMessage.java 21 | 0 22 | *.g.csproj 23 | temp-war-deps 24 | /.gitversion.tmp 25 | /.gitversion.short.tmp 26 | *.vspscc 27 | *.bak 28 | *.scc 29 | *.xap 30 | MSSCCPRJ.SCC 31 | DebugLog.* 32 | *.orig 33 | *.log 34 | log.txt 35 | *.docstates 36 | *.mp4 37 | *.mp3 38 | *.mov 39 | .idea 40 | .DS_Store 41 | .sdf 42 | packages/ 43 | TestResults/ -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 OdeToCode LLC 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /src/.nuget/NuGet.Config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/.nuget/NuGet.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/.nuget/NuGet.exe -------------------------------------------------------------------------------- /src/.nuget/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/FlexProviders.EF/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/FlexProviders.Mongo/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/FlexProviders.Raven/FlexProviders.Raven.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $id$ 5 | $version$ 6 | $title$ 7 | $author$ 8 | $author$ 9 | http://opensource.org/licenses/MIT 10 | https://github.com/odetocode/Memflex 11 | false 12 | $description$ 13 | 14 | Copyright 2013 15 | asp.net membership ravendb 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/FlexProviders.Raven/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/FlexProviders.Tests.EF/IntegrationTest.cs: -------------------------------------------------------------------------------- 1 | using FlexProviders.Membership; 2 | using FlexProviders.Roles; 3 | 4 | namespace FlexProviders.Tests.Integration.EF 5 | { 6 | public class IntegrationTest 7 | { 8 | protected readonly FlexMembershipProvider MembershipProvider; 9 | protected readonly FakeApplicationEnvironment Environment; 10 | protected readonly UserStore UserStore; 11 | protected readonly RoleStore RoleStore; 12 | protected readonly FlexRoleProvider RoleProvider; 13 | 14 | protected TestDb _db; 15 | 16 | public IntegrationTest() 17 | { 18 | var context = new SomeDb("name=Default"); 19 | _db = new TestDb(); 20 | UserStore = new UserStore(context); 21 | RoleStore = new RoleStore(context); 22 | Environment = new FakeApplicationEnvironment(); 23 | RoleProvider = new FlexRoleProvider(RoleStore); 24 | MembershipProvider = new FlexMembershipProvider(UserStore, Environment); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests.EF/Membership/ChangePasswordTests.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | using Xunit.Extensions; 3 | 4 | namespace FlexProviders.Tests.Integration.EF.Membership 5 | { 6 | public class ChangePasswordTests : IntegrationTest 7 | { 8 | [Fact] 9 | [AutoRollback] 10 | public void Can_Change_Password() 11 | { 12 | var username = "sallen"; 13 | var password = "12345678"; 14 | var user = new User { Username = username, Password = password }; 15 | MembershipProvider.CreateAccount(user); 16 | 17 | var firstEncodedPassword = _db.GetPassword(username); 18 | MembershipProvider.ChangePassword(username, password, "foo"); 19 | var secondEncodedPassword = _db.GetPassword(username); 20 | 21 | Assert.NotEqual(firstEncodedPassword, secondEncodedPassword); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests.EF/Membership/CreateAccountTests.cs: -------------------------------------------------------------------------------- 1 | using FlexProviders.Membership; 2 | using Xunit; 3 | using Xunit.Extensions; 4 | 5 | namespace FlexProviders.Tests.Integration.EF.Membership 6 | { 7 | public class CreateAccountTests : IntegrationTest 8 | { 9 | [Fact] 10 | [AutoRollback] 11 | public void Can_Create_Account() 12 | { 13 | var user = new User() {Username = "sallen", Password = "12345678"}; 14 | 15 | MembershipProvider.CreateAccount(user); 16 | 17 | Assert.True(_db.CanFindUsername("sallen")); 18 | } 19 | 20 | [Fact] 21 | [AutoRollback] 22 | public void Fails_If_Duplicate_Username() 23 | { 24 | var user = new User() { Username = "sallen", Password = "12345678" }; 25 | 26 | MembershipProvider.CreateAccount(user); 27 | 28 | Assert.Throws(() => MembershipProvider.CreateAccount(user)); 29 | } 30 | 31 | [Fact] 32 | [AutoRollback] 33 | public void Account_Created_As_Local_Account() 34 | { 35 | var user = new User() { Username = "sallen", Password = "12345678" }; 36 | 37 | MembershipProvider.CreateAccount(user); 38 | 39 | Assert.True(MembershipProvider.HasLocalAccount("sallen")); 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests.EF/Membership/Login_Tests.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | using Xunit.Extensions; 3 | 4 | namespace FlexProviders.Tests.Integration.EF.Membership 5 | { 6 | public class Login_Tests : IntegrationTest 7 | { 8 | [Fact] 9 | [AutoRollback] 10 | public void Can_Login_With_Good_Password() 11 | { 12 | var username = "sallen"; 13 | var password = "12345678"; 14 | var user = new User {Username = username, Password = password}; 15 | MembershipProvider.CreateAccount(user); 16 | 17 | bool result = MembershipProvider.Login(username, password); 18 | 19 | Assert.True(result); 20 | } 21 | 22 | [Fact] 23 | [AutoRollback] 24 | public void Cannot_Login_With_Bad_Password() 25 | { 26 | var username = "sallen"; 27 | var password = "12345678"; 28 | var user = new User { Username = username, Password = password }; 29 | MembershipProvider.CreateAccount(user); 30 | 31 | bool result = MembershipProvider.Login(username, "foo"); 32 | 33 | Assert.False(result); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests.EF/Migrations/Configuration.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity.Migrations; 2 | 3 | namespace FlexProviders.Tests.Integration.EF.Migrations 4 | { 5 | public sealed class Configuration : DbMigrationsConfiguration 6 | { 7 | public Configuration() 8 | { 9 | AutomaticMigrationsEnabled = true; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/FlexProviders.Tests.EF/OAuth/CreateUpdateAccountTests.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | using Xunit.Extensions; 3 | 4 | namespace FlexProviders.Tests.Integration.EF.OAuth 5 | { 6 | public class CreateUpdateAccountTests : IntegrationTest 7 | { 8 | [Fact] 9 | [AutoRollback] 10 | public void Can_Create_OAuth_Account() 11 | { 12 | MembershipProvider.CreateOAuthAccount("Microsoft", "bitmask", new User { Username = "sallen" }); 13 | 14 | Assert.Equal(1, _db.GetCountOfOAuthAccounts("sallen")); 15 | } 16 | 17 | [Fact] 18 | [AutoRollback] 19 | public void Can_Update_OAuth_Account() 20 | { 21 | MembershipProvider.CreateOAuthAccount("Microsoft", "bitmask", new User { Username = "sallen" }); 22 | MembershipProvider.CreateOAuthAccount("Yahoo", "bitmask", new User { Username = "sallen" }); 23 | 24 | Assert.Equal(2, _db.GetCountOfOAuthAccounts("sallen")); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests.EF/OAuth/GetUserNameTests.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | using Xunit.Extensions; 3 | 4 | namespace FlexProviders.Tests.Integration.EF.OAuth 5 | { 6 | public class GetUserNameTests : IntegrationTest 7 | { 8 | [Fact] 9 | [AutoRollback] 10 | public void Can_Get_Username_Given_ProviderInfo() 11 | { 12 | MembershipProvider.CreateOAuthAccount("Microsoft", "bitmask", new User { Username = "sallen" }); 13 | 14 | var name = MembershipProvider.GetUserNameFromOpenAuth("Microsoft", "bitmask"); 15 | 16 | Assert.Equal("sallen", name); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests.EF/Role.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using FlexProviders.Roles; 3 | 4 | namespace FlexProviders.Tests.Integration.EF 5 | { 6 | public class Role : IFlexRole 7 | { 8 | public int Id { get; set; } 9 | public string Name { get; set; } 10 | public ICollection Users { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests.EF/RoleStore.cs: -------------------------------------------------------------------------------- 1 | using FlexProviders.EF; 2 | 3 | namespace FlexProviders.Tests.Integration.EF 4 | { 5 | public class RoleStore : FlexRoleStore 6 | { 7 | public RoleStore(SomeDb db) : base(db) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests.EF/Roles/CreateRoles.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xunit; 3 | using Xunit.Extensions; 4 | 5 | namespace FlexProviders.Tests.Integration.EF.Roles 6 | { 7 | public class CreateRoles : IntegrationTest 8 | { 9 | [Fact] 10 | [AutoRollback] 11 | public void Can_Create_Role() 12 | { 13 | RoleProvider.CreateRole("admin"); 14 | 15 | Assert.True(_db.CanFindRole("admin")); 16 | } 17 | 18 | [Fact] 19 | [AutoRollback] 20 | public void Can_Add_Users_To_Role() 21 | { 22 | var user = new User {Username = "sallen", Password="123", PasswordResetTokenExpiration = DateTime.Now}; 23 | RoleProvider.CreateRole("admin"); 24 | MembershipProvider.CreateAccount(user); 25 | 26 | RoleProvider.AddUsersToRoles(new [] { "sallen"}, new [] { "admin"}); 27 | 28 | Assert.True(_db.UserIsInRole("sallen", "admin")); 29 | } 30 | 31 | 32 | } 33 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests.EF/SomeDb.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity; 2 | using FlexProviders.Membership; 3 | 4 | namespace FlexProviders.Tests.Integration.EF 5 | { 6 | public class SomeDb : DbContext 7 | { 8 | public SomeDb() 9 | { 10 | } 11 | 12 | public SomeDb(string connectionStringOrName) 13 | : base(connectionStringOrName) 14 | { 15 | } 16 | 17 | public DbSet Users { get; set; } 18 | public DbSet Roles { get; set; } 19 | 20 | protected override void OnModelCreating(DbModelBuilder modelBuilder) 21 | { 22 | modelBuilder.Entity().HasKey(a => new { a.Provider, a.ProviderUserId }); 23 | base.OnModelCreating(modelBuilder); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests.EF/User.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using FlexProviders.Membership; 4 | 5 | namespace FlexProviders.Tests.Integration.EF 6 | { 7 | public class User : IFlexMembershipUser 8 | { 9 | public User() 10 | { 11 | PasswordResetTokenExpiration = DateTime.Now; 12 | } 13 | 14 | public int Id { get; set; } 15 | public string Group { get; set; } 16 | public string Username { get; set; } 17 | public string Password { get; set; } 18 | public string Email { get; set; } 19 | public string Salt { get; set; } 20 | public string PasswordResetToken { get; set; } 21 | public DateTime PasswordResetTokenExpiration { get; set; } 22 | public bool IsLocal { get; set; } 23 | public int FavoriteNumber { get; set; } 24 | public virtual ICollection OAuthAccounts { get; set; } 25 | public ICollection Roles { get; set; } 26 | public string License { get; set; } 27 | public string SsoToken { get; set; } 28 | public DateTime? SsoTokenExpiration { get; set; } 29 | } 30 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests.EF/UserStore.cs: -------------------------------------------------------------------------------- 1 | using FlexProviders.EF; 2 | 3 | namespace FlexProviders.Tests.Integration.EF 4 | { 5 | public class UserStore : FlexMembershipUserStore 6 | { 7 | public UserStore(SomeDb db) : base(db) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests.Mongo/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/FlexProviders.Tests.Mongo/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/FlexProviders.Tests.Raven/Membership/ChangePasswordTests.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using Xunit; 3 | 4 | namespace FlexProviders.Tests.Integration.Raven.Membership 5 | { 6 | public class ChangePasswordTests : IntegrationTest 7 | { 8 | [Fact] 9 | public void Can_Change_Password() 10 | { 11 | var username = "sallen"; 12 | var password = "12345678"; 13 | var user = new User { Username = username, Password = password }; 14 | MembershipProvider.CreateAccount(user); 15 | 16 | var firstEncodedPassword = Verifier.Query().Single(u => u.Username == "sallen").Password; 17 | MembershipProvider.ChangePassword(username, password, "foo"); 18 | var secondEncodedPassword = Verifier.Query().Single(u => u.Username == "sallen").Password; 19 | 20 | Assert.NotEqual(firstEncodedPassword, secondEncodedPassword); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests.Raven/Membership/LoginTests.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | namespace FlexProviders.Tests.Integration.Raven.Membership 4 | { 5 | public class LoginTests : IntegrationTest 6 | { 7 | [Fact] 8 | public void Can_Login_With_Good_Password() 9 | { 10 | var username = "sallen"; 11 | var password = "12345678"; 12 | var user = new User { Username = username, Password = password }; 13 | MembershipProvider.CreateAccount(user); 14 | 15 | bool result = MembershipProvider.Login(username, password); 16 | 17 | Assert.True(result); 18 | } 19 | 20 | [Fact] 21 | public void Cannot_Login_With_Bad_Password() 22 | { 23 | var username = "sallen"; 24 | var password = "12345678"; 25 | var user = new User { Username = username, Password = password }; 26 | MembershipProvider.CreateAccount(user); 27 | 28 | bool result = MembershipProvider.Login(username, "foo"); 29 | 30 | Assert.False(result); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests.Raven/OAuth/CreateUpdateAccountTests.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using Xunit; 3 | 4 | namespace FlexProviders.Tests.Integration.Raven.OAuth 5 | { 6 | public class CreateUpdateAccountTests : IntegrationTest 7 | { 8 | [Fact] 9 | public void Can_Create_OAuth_Account() 10 | { 11 | MembershipProvider.CreateOAuthAccount("Microsoft", "bitmask", new User { Username="sallen"}); 12 | 13 | Assert.Equal(1, Verifier.Query().Single(u=>u.Username == "sallen").OAuthAccounts.Count()); 14 | } 15 | 16 | [Fact] 17 | public void Can_Update_OAuth_Account() 18 | { 19 | MembershipProvider.CreateOAuthAccount("Microsoft", "bitmask", new User { Username = "sallen" }); 20 | MembershipProvider.CreateOAuthAccount("Yahoo", "bitmask", new User { Username = "sallen" }); 21 | 22 | Assert.Equal(2, Verifier.Query().Single(u => u.Username == "sallen").OAuthAccounts.Count()); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests.Raven/OAuth/GetUserNameTests.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | namespace FlexProviders.Tests.Integration.Raven.OAuth 4 | { 5 | public class GetUserNameTests : IntegrationTest 6 | { 7 | [Fact] 8 | public void Can_Get_Username_Given_ProviderInfo() 9 | { 10 | MembershipProvider.CreateOAuthAccount("Microsoft", "bitmask", new User() { Username = "sallen"}); 11 | 12 | var name = MembershipProvider.GetUserNameFromOpenAuth("Microsoft", "bitmask"); 13 | 14 | Assert.Equal("sallen", name); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests.Raven/Role.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.ObjectModel; 3 | using FlexProviders.Roles; 4 | 5 | namespace FlexProviders.Tests.Integration.Raven 6 | { 7 | public class Role : IFlexRole 8 | { 9 | /// 10 | /// Initializes a new instance of the class. 11 | /// 12 | public Role() 13 | { 14 | Users = new Collection(); 15 | } 16 | 17 | #region IFlexRole Members 18 | 19 | /// 20 | /// Gets or sets the users. 21 | /// 22 | /// The users. 23 | public ICollection Users { get; set; } 24 | 25 | /// 26 | /// Gets or sets the name. 27 | /// 28 | /// The name. 29 | public string Name { get; set; } 30 | 31 | #endregion 32 | } 33 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests.Raven/Roles/CreateRoles.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using Xunit; 3 | 4 | namespace FlexProviders.Tests.Integration.Raven.Roles 5 | { 6 | public class CreateRoles : IntegrationTest 7 | { 8 | [Fact] 9 | public void Can_Create_Role() 10 | { 11 | RoleProvider.CreateRole("admin"); 12 | Assert.NotNull(Verifier.Query().SingleOrDefault(r => r.Name == "admin")); 13 | } 14 | 15 | [Fact] 16 | public void Can_Add_Users_To_Role() 17 | { 18 | var user = new User { Username = "sallen", Password = "123" }; 19 | RoleProvider.CreateRole("admin"); 20 | MembershipProvider.CreateAccount(user); 21 | 22 | RoleProvider.AddUsersToRoles(new[] { "sallen" }, new[] { "admin" }); 23 | 24 | Assert.True(Verifier.Query().SingleOrDefault(r => r.Name == "admin").Users.Contains("sallen")); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests.Raven/User.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using FlexProviders.Membership; 4 | 5 | namespace FlexProviders.Tests.Integration.Raven 6 | { 7 | public class User : IFlexMembershipUser 8 | { 9 | public int Id { get; set; } 10 | public string Username { get; set; } 11 | public string Password { get; set; } 12 | public string Salt { get; set; } 13 | public string PasswordResetToken { get; set; } 14 | public DateTime PasswordResetTokenExpiration { get; set; } 15 | public bool IsLocal { get; set; } 16 | public ICollection OAuthAccounts { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests.Raven/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/FlexProviders.Tests/Integration/EF/OAuth/CreateUpdateAccountTests.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | using Xunit.Extensions; 3 | 4 | namespace FlexProviders.Tests.Integration.EF.OAuth 5 | { 6 | public class CreateUpdateAccountTests : IntegrationTest 7 | { 8 | [Fact] 9 | [AutoRollback] 10 | public void Can_Create_OAuth_Account() 11 | { 12 | MembershipProvider.CreateOAuthAccount("Microsoft", "bitmask", new User { Username = "sallen" }); 13 | 14 | Assert.Equal(1, _db.GetCountOfOAuthAccounts("sallen")); 15 | } 16 | 17 | [Fact] 18 | [AutoRollback] 19 | public void Can_Update_OAuth_Account() 20 | { 21 | MembershipProvider.CreateOAuthAccount("Microsoft", "bitmask", new User { Username = "sallen" }); 22 | MembershipProvider.CreateOAuthAccount("Yahoo", "bitmask", new User { Username = "sallen" }); 23 | 24 | Assert.Equal(2, _db.GetCountOfOAuthAccounts("sallen")); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests/Integration/EF/OAuth/GetUserNameTests.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | using Xunit.Extensions; 3 | 4 | namespace FlexProviders.Tests.Integration.EF.OAuth 5 | { 6 | public class GetUserNameTests : IntegrationTest 7 | { 8 | [Fact] 9 | [AutoRollback] 10 | public void Can_Get_Username_Given_ProviderInfo() 11 | { 12 | MembershipProvider.CreateOAuthAccount("Microsoft", "bitmask", new User { Username = "sallen" }); 13 | 14 | var name = MembershipProvider.GetUserNameFromOpenAuth("Microsoft", "bitmask"); 15 | 16 | Assert.Equal("sallen", name); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests/Integration/FakeApplicationEnvironment.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using DotNetOpenAuth.AspNet; 3 | using FlexProviders.Membership; 4 | 5 | namespace FlexProviders.Tests.Integration 6 | { 7 | public class FakeApplicationEnvironment : IApplicationEnvironment 8 | { 9 | public void IssueAuthTicket(string username, bool persist) 10 | { 11 | 12 | } 13 | 14 | public void RevokeAuthTicket() 15 | { 16 | 17 | } 18 | 19 | public string GetOAuthPoviderName() 20 | { 21 | return ""; 22 | } 23 | 24 | public void RequestAuthentication(IAuthenticationClient client, IOpenAuthDataProvider provider, string returnUrl) 25 | { 26 | 27 | } 28 | 29 | public AuthenticationResult VerifyAuthentication(IAuthenticationClient client, IOpenAuthDataProvider provider, string returnUrl) 30 | { 31 | return new AuthenticationResult(true); 32 | } 33 | 34 | public HttpContextBase AcquireContext() 35 | { 36 | return new FakeHttpContext(); 37 | } 38 | 39 | public class FakeHttpContext : HttpContextBase 40 | { 41 | 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests/Integration/Raven/OAuth/CreateUpdateAccountTests.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using Xunit; 3 | 4 | namespace FlexProviders.Tests.Integration.Raven.OAuth 5 | { 6 | public class CreateUpdateAccountTests : IntegrationTest 7 | { 8 | [Fact] 9 | public void Can_Create_OAuth_Account() 10 | { 11 | MembershipProvider.CreateOAuthAccount("Microsoft", "bitmask", new User { Username="sallen"}); 12 | 13 | Assert.Equal(1, Verifier.Query().Single(u=>u.Username == "sallen").OAuthAccounts.Count()); 14 | } 15 | 16 | [Fact] 17 | public void Can_Update_OAuth_Account() 18 | { 19 | MembershipProvider.CreateOAuthAccount("Microsoft", "bitmask", new User { Username = "sallen" }); 20 | MembershipProvider.CreateOAuthAccount("Yahoo", "bitmask", new User { Username = "sallen" }); 21 | 22 | Assert.Equal(2, Verifier.Query().Single(u => u.Username == "sallen").OAuthAccounts.Count()); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests/Integration/Raven/OAuth/GetUserNameTests.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | namespace FlexProviders.Tests.Integration.Raven.OAuth 4 | { 5 | public class GetUserNameTests : IntegrationTest 6 | { 7 | [Fact] 8 | public void Can_Get_Username_Given_ProviderInfo() 9 | { 10 | MembershipProvider.CreateOAuthAccount("Microsoft", "bitmask", new User() { Username = "sallen"}); 11 | 12 | var name = MembershipProvider.GetUserNameFromOpenAuth("Microsoft", "bitmask"); 13 | 14 | Assert.Equal("sallen", name); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests/Security/Encryption/EncryptorTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using FlexProviders.Membership; 3 | using Xunit; 4 | 5 | namespace FlexProviders.Tests.Security.Encryption 6 | { 7 | public class EncryptorTests 8 | { 9 | [Fact] 10 | public void Can_Hash_A_Password() 11 | { 12 | var encryptor = new DefaultSecurityEncoder(); 13 | string salt = encryptor.GenerateSalt(); 14 | var result1 = encryptor.Encode("plainText", salt); 15 | var result2 = encryptor.Encode("plainText", salt); 16 | 17 | Assert.False(String.IsNullOrEmpty(result1)); 18 | Assert.NotEqual("plainText", result1); 19 | Assert.Equal(result1, result2); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/FlexProviders.Tests/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/FlexProviders.Tests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/FlexProviders/Membership/FlexMembershipException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.Serialization; 3 | 4 | namespace FlexProviders.Membership 5 | { 6 | [Serializable] 7 | public class FlexMembershipException : Exception 8 | { 9 | public FlexMembershipStatus StatusCode { get; set; } 10 | 11 | public FlexMembershipException() 12 | { 13 | } 14 | 15 | public FlexMembershipException(string message) : base(message) 16 | { 17 | } 18 | 19 | public FlexMembershipException(string message, Exception inner) : base(message, inner) 20 | { 21 | } 22 | 23 | public FlexMembershipException(FlexMembershipStatus statusCode) 24 | { 25 | this.StatusCode = statusCode; 26 | } 27 | 28 | protected FlexMembershipException(SerializationInfo info, StreamingContext context) : base(info, context) 29 | { 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/FlexProviders/Membership/FlexMembershipStatus.cs: -------------------------------------------------------------------------------- 1 | namespace FlexProviders.Membership 2 | { 3 | public enum FlexMembershipStatus 4 | { 5 | Success, 6 | InvalidUserName, 7 | InvalidPassword, 8 | InvalidQuestion, 9 | InvalidAnswer, 10 | InvalidEmail, 11 | DuplicateUserName, 12 | DuplicateEmail, 13 | UserRejected, 14 | InvalidProviderUserKey, 15 | DuplicateProviderUserKey, 16 | ProviderError, 17 | } 18 | } -------------------------------------------------------------------------------- /src/FlexProviders/Membership/FlexOAuthAccount.cs: -------------------------------------------------------------------------------- 1 | namespace FlexProviders.Membership 2 | { 3 | public class FlexOAuthAccount 4 | { 5 | /// 6 | /// Gets or sets the provider. 7 | /// 8 | /// The provider. 9 | public string Provider { get; set; } 10 | 11 | /// 12 | /// Gets or sets the provider user id. 13 | /// 14 | /// The provider user id. 15 | public string ProviderUserId { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /src/FlexProviders/Membership/FlexPrincipal.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Principal; 2 | 3 | namespace FlexProviders.Membership 4 | { 5 | public class FlexPrincipal : IFlexPrincipal 6 | { 7 | public IIdentity Identity { get; private set; } 8 | public bool IsInRole(string role) { return false; } 9 | 10 | public FlexPrincipal(string username) 11 | { 12 | this.Identity = new GenericIdentity(username); 13 | } 14 | 15 | public string License { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/FlexProviders/Membership/FlexPrincipalSerializeModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace FlexProviders.Membership 8 | { 9 | public class FlexPrincipalSerializeModel 10 | { 11 | public string License { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/FlexProviders/Membership/IFlexMembershipUser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace FlexProviders.Membership 5 | { 6 | public interface IFlexMembershipUser 7 | { 8 | //The license the user is part of, null is valid. 9 | //Used if user "sallen" should exists with two customers of you system, it allows the same user with a license diffrentiator. 10 | string License { get; set; } 11 | 12 | //Single sign on token 13 | string SsoToken { get; set; } 14 | DateTime? SsoTokenExpiration { get; set; } 15 | 16 | string Username { get; set; } 17 | string Password { get; set; } 18 | string Salt { get; set; } 19 | string PasswordResetToken { get; set; } 20 | DateTime PasswordResetTokenExpiration { get; set; } 21 | ICollection OAuthAccounts { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /src/FlexProviders/Membership/IFlexPrincipal.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Principal; 2 | 3 | namespace FlexProviders.Membership 4 | { 5 | public interface IFlexPrincipal : IPrincipal 6 | { 7 | string License { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/FlexProviders/Membership/IFlexUserStore.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Microsoft.Web.WebPages.OAuth; 3 | 4 | namespace FlexProviders.Membership 5 | { 6 | public interface IFlexUserStore where TUser: IFlexMembershipUser 7 | { 8 | TUser Add(TUser user); 9 | TUser Save(TUser user); 10 | TUser CreateOAuthAccount(string provider, string providerUserId, TUser user); 11 | TUser GetUserByUsername(string username, string license = null); 12 | TUser GetUserBySsoToken(string token); 13 | IEnumerable GetAllUsers(string license = null); 14 | TUser GetUserByOAuthProvider(string provider, string providerUserId); 15 | IEnumerable GetOAuthAccountsForUser(string username, string license = null); 16 | bool DeleteOAuthAccount(string provider, string providerUserId); 17 | TUser GetUserByPasswordResetToken(string passwordResetToken); 18 | bool RenameLicense(string oldName, string newName); 19 | } 20 | } -------------------------------------------------------------------------------- /src/FlexProviders/Roles/IFlexRole.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace FlexProviders.Roles 4 | { 5 | public interface IFlexRole 6 | { 7 | /// 8 | /// Gets or sets the name. 9 | /// 10 | /// 11 | /// The name. 12 | /// 13 | string Name { get; set; } 14 | 15 | /// 16 | /// Gets or sets the users. 17 | /// 18 | /// 19 | /// The users. 20 | /// 21 | ICollection Users { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /src/FlexProviders/Roles/IFlexRoleProvider.cs: -------------------------------------------------------------------------------- 1 | namespace FlexProviders.Roles 2 | { 3 | public interface IFlexRoleProvider 4 | { 5 | bool IsUserInRole(string username, string roleName, string license = null); 6 | string[] GetRolesForUser(string username, string license = null); 7 | void CreateRole(string roleName); 8 | bool DeleteRole(string roleName, bool throwOnPopulatedRole); 9 | bool RoleExists(string roleName); 10 | void AddUsersToRoles(string[] usernames, string[] roleNames, string license = null); 11 | void RemoveUsersFromRoles(string[] usernames, string[] roleNames, string license = null); 12 | string[] GetUsersInRole(string roleName, string license = null); 13 | string[] GetAllUsersInRole(string roleName); 14 | string[] GetAllRoles(); 15 | } 16 | } -------------------------------------------------------------------------------- /src/FlexProviders/Roles/IFlexRoleStore.cs: -------------------------------------------------------------------------------- 1 | namespace FlexProviders.Roles 2 | { 3 | public interface IFlexRoleStore 4 | { 5 | void CreateRole(string roleName); 6 | string[] GetRolesForUser(string username, string license = null); 7 | string[] GetUsersInRole(string roleName, string license = null); 8 | string[] GetAllUsersInRole(string roleName); 9 | string[] GetAllRoles(); 10 | void RemoveUsersFromRoles(string[] usernames, string[] roleNames, string license = null); 11 | void AddUsersToRoles(string[] usernames, string[] roleNames, string license = null); 12 | bool RoleExists(string roleName); 13 | bool DeleteRole(string roleName); 14 | } 15 | } -------------------------------------------------------------------------------- /src/FlexProviders/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/Sample.Mongo/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | 4 | namespace LogMeIn 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Sample.Mongo/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | 8 | namespace LogMeIn 9 | { 10 | public class RouteConfig 11 | { 12 | public static void RegisterRoutes(RouteCollection routes) 13 | { 14 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 15 | 16 | routes.MapRoute( 17 | name: "Default", 18 | url: "{controller}/{action}/{id}", 19 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } 20 | ); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Sample.Mongo/App_Start/StructuremapMvc.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using LogMeIn.DependencyResolution; 3 | 4 | [assembly: WebActivator.PreApplicationStartMethod(typeof(LogMeIn.App_Start.StructuremapMvc), "Start")] 5 | 6 | namespace LogMeIn.App_Start { 7 | public static class StructuremapMvc { 8 | public static void Start() { 9 | var container = IoC.Initialize(); 10 | DependencyResolver.SetResolver(new StructureMapDependencyResolver(container)); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Sample.Mongo/App_Start/WebApiConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web.Http; 5 | 6 | namespace LogMeIn 7 | { 8 | public static class WebApiConfig 9 | { 10 | public static void Register(HttpConfiguration config) 11 | { 12 | config.Routes.MapHttpRoute( 13 | name: "DefaultApi", 14 | routeTemplate: "api/{controller}/{id}", 15 | defaults: new { id = RouteParameter.Optional } 16 | ); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/jquery.ui.accordion.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Accordion 1.8.20 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Accordion#theming 9 | */ 10 | /* IE/Win - Fix animation bug - #4615 */ 11 | .ui-accordion { width: 100%; } 12 | .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } 13 | .ui-accordion .ui-accordion-li-fix { display: inline; } 14 | .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } 15 | .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } 16 | .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } 17 | .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } 18 | .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } 19 | .ui-accordion .ui-accordion-content-active { display: block; } 20 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/jquery.ui.all.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.8.20 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Theming 9 | */ 10 | @import "jquery.ui.base.css"; 11 | @import "jquery.ui.theme.css"; 12 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/jquery.ui.autocomplete.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Autocomplete 1.8.20 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Autocomplete#theming 9 | */ 10 | .ui-autocomplete { position: absolute; cursor: default; } 11 | 12 | /* workarounds */ 13 | * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ 14 | 15 | /* 16 | * jQuery UI Menu 1.8.20 17 | * 18 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 19 | * Licensed under the MIT license. 20 | * http://jquery.org/license 21 | * 22 | * http://docs.jquery.com/UI/Menu#theming 23 | */ 24 | .ui-menu { 25 | list-style:none; 26 | padding: 2px; 27 | margin: 0; 28 | display:block; 29 | float: left; 30 | } 31 | .ui-menu .ui-menu { 32 | margin-top: -3px; 33 | } 34 | .ui-menu .ui-menu-item { 35 | margin:0; 36 | padding: 0; 37 | zoom: 1; 38 | float: left; 39 | clear: left; 40 | width: 100%; 41 | } 42 | .ui-menu .ui-menu-item a { 43 | text-decoration:none; 44 | display:block; 45 | padding:.2em .4em; 46 | line-height:1.5; 47 | zoom:1; 48 | } 49 | .ui-menu .ui-menu-item a.ui-state-hover, 50 | .ui-menu .ui-menu-item a.ui-state-active { 51 | font-weight: normal; 52 | margin: -1px; 53 | } 54 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/jquery.ui.base.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.8.20 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Theming 9 | */ 10 | @import url("jquery.ui.core.css"); 11 | 12 | @import url("jquery.ui.accordion.css"); 13 | @import url("jquery.ui.autocomplete.css"); 14 | @import url("jquery.ui.button.css"); 15 | @import url("jquery.ui.datepicker.css"); 16 | @import url("jquery.ui.dialog.css"); 17 | @import url("jquery.ui.progressbar.css"); 18 | @import url("jquery.ui.resizable.css"); 19 | @import url("jquery.ui.selectable.css"); 20 | @import url("jquery.ui.slider.css"); 21 | @import url("jquery.ui.tabs.css"); 22 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/jquery.ui.dialog.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Dialog 1.8.20 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Dialog#theming 9 | */ 10 | .ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } 11 | .ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } 12 | .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } 13 | .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } 14 | .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } 15 | .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } 16 | .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } 17 | .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } 18 | .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } 19 | .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } 20 | .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } 21 | .ui-draggable .ui-dialog-titlebar { cursor: move; } 22 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/jquery.ui.progressbar.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Progressbar 1.8.20 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Progressbar#theming 9 | */ 10 | .ui-progressbar { height:2em; text-align: left; overflow: hidden; } 11 | .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/jquery.ui.resizable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Resizable 1.8.20 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Resizable#theming 9 | */ 10 | .ui-resizable { position: relative;} 11 | .ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; } 12 | .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } 13 | .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } 14 | .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } 15 | .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } 16 | .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } 17 | .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } 18 | .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } 19 | .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } 20 | .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;} -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/jquery.ui.selectable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Selectable 1.8.20 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Selectable#theming 9 | */ 10 | .ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } 11 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/jquery.ui.slider.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Slider 1.8.20 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Slider#theming 9 | */ 10 | .ui-slider { position: relative; text-align: left; } 11 | .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } 12 | .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } 13 | 14 | .ui-slider-horizontal { height: .8em; } 15 | .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } 16 | .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } 17 | .ui-slider-horizontal .ui-slider-range-min { left: 0; } 18 | .ui-slider-horizontal .ui-slider-range-max { right: 0; } 19 | 20 | .ui-slider-vertical { width: .8em; height: 100px; } 21 | .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } 22 | .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } 23 | .ui-slider-vertical .ui-slider-range-min { bottom: 0; } 24 | .ui-slider-vertical .ui-slider-range-max { top: 0; } -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/minified/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/minified/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/minified/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/minified/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/minified/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/minified/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/minified/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/minified/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/minified/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/minified/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/minified/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/minified/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/minified/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/minified/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/minified/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/minified/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/minified/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/minified/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/minified/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/minified/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/minified/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/minified/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/minified/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/minified/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/minified/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Content/themes/base/minified/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/minified/jquery.ui.accordion.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.20 - 2012-04-30 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.accordion.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-accordion{width:100%}.ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1}.ui-accordion .ui-accordion-li-fix{display:inline}.ui-accordion .ui-accordion-header-active{border-bottom:0!important}.ui-accordion .ui-accordion-header a{display:block;font-size:1em;padding:.5em .5em .5em .7em}.ui-accordion-icons .ui-accordion-header a{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;margin-top:-2px;position:relative;top:1px;margin-bottom:2px;overflow:auto;display:none;zoom:1}.ui-accordion .ui-accordion-content-active{display:block} -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/minified/jquery.ui.autocomplete.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.20 - 2012-04-30 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.autocomplete.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-autocomplete{position:absolute;cursor:default}* html .ui-autocomplete{width:1px}.ui-menu{list-style:none;padding:2px;margin:0;display:block;float:left}.ui-menu .ui-menu{margin-top:-3px}.ui-menu .ui-menu-item{margin:0;padding:0;zoom:1;float:left;clear:left;width:100%}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:.2em .4em;line-height:1.5;zoom:1}.ui-menu .ui-menu-item a.ui-state-hover,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px} -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/minified/jquery.ui.core.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.20 - 2012-04-30 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.core.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{position:absolute!important;clip:rect(1px);clip:rect(1px,1px,1px,1px)}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{zoom:1}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%} -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/minified/jquery.ui.dialog.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.20 - 2012-04-30 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.dialog.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-dialog{position:absolute;padding:.2em;width:300px;overflow:hidden}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 16px .1em 0}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px}.ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px}.ui-dialog .ui-dialog-titlebar-close:hover,.ui-dialog .ui-dialog-titlebar-close:focus{padding:0}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto;zoom:1}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px}.ui-draggable .ui-dialog-titlebar{cursor:move} -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/minified/jquery.ui.progressbar.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.20 - 2012-04-30 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.progressbar.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%} -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/minified/jquery.ui.resizable.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.20 - 2012-04-30 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.resizable.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px} -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/minified/jquery.ui.selectable.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.20 - 2012-04-30 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.selectable.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black} -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/minified/jquery.ui.slider.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.20 - 2012-04-30 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.slider.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0} -------------------------------------------------------------------------------- /src/Sample.Mongo/Content/themes/base/minified/jquery.ui.tabs.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.20 - 2012-04-30 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.tabs.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-tabs{position:relative;padding:.2em;zoom:1}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:1px;margin:0 .2em 1px 0;border-bottom:0!important;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-selected{margin-bottom:0;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-selected a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-state-processing a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tabs .ui-tabs-hide{display:none!important} -------------------------------------------------------------------------------- /src/Sample.Mongo/Controllers/AdminController.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using LogMeIn.Filters; 3 | 4 | namespace LogMeIn.Controllers 5 | { 6 | public class AdminController : Controller 7 | { 8 | // 9 | // GET: /Admin/ 10 | [FlexAuthorize(Roles="admin")] 11 | public ActionResult Index() 12 | { 13 | return Content("You can see me!"); 14 | } 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Data; 4 | using System.Data.Entity; 5 | using System.Linq; 6 | using System.Web; 7 | using System.Web.Mvc; 8 | using LogMeIn.Models; 9 | 10 | namespace LogMeIn.Controllers 11 | { 12 | [Authorize] 13 | public class HomeController : Controller 14 | { 15 | // 16 | // GET: /Home/ 17 | 18 | public ActionResult Index() 19 | { 20 | return View(); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Sample.Mongo/DependencyResolution/SmFilterProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using System.Web.Mvc; 4 | using StructureMap; 5 | 6 | namespace LogMeIn 7 | { 8 | public class SmFilterProvider : FilterAttributeFilterProvider 9 | { 10 | public SmFilterProvider(IContainer container) 11 | { 12 | _container = container; 13 | } 14 | 15 | public override IEnumerable GetFilters(ControllerContext controllerContext, ActionDescriptor actionDescriptor) 16 | { 17 | var filters = base.GetFilters(controllerContext, actionDescriptor).ToList(); 18 | 19 | foreach (var filter in filters) 20 | _container.BuildUp(filter.Instance); 21 | 22 | return filters; 23 | } 24 | 25 | private readonly IContainer _container; 26 | } 27 | } -------------------------------------------------------------------------------- /src/Sample.Mongo/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="LogMeIn.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Http; 2 | using System.Web.Mvc; 3 | using System.Web.Optimization; 4 | using System.Web.Routing; 5 | 6 | namespace LogMeIn 7 | { 8 | // Note: For instructions on enabling IIS6 or IIS7 classic mode, 9 | // visit http://go.microsoft.com/?LinkId=9394801 10 | 11 | public class MvcApplication : System.Web.HttpApplication 12 | { 13 | protected void Application_Start() 14 | { 15 | AreaRegistration.RegisterAllAreas(); 16 | WebApiConfig.Register(GlobalConfiguration.Configuration); 17 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 18 | RouteConfig.RegisterRoutes(RouteTable.Routes); 19 | BundleConfig.RegisterBundles(BundleTable.Bundles); 20 | AuthConfig.RegisterAuth(); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Sample.Mongo/Images/accent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Images/accent.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Images/bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Images/bullet.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Images/heroAccent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Images/heroAccent.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Images/orderedList0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Images/orderedList0.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Images/orderedList1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Images/orderedList1.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Images/orderedList2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Images/orderedList2.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Images/orderedList3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Images/orderedList3.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Images/orderedList4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Images/orderedList4.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Images/orderedList5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Images/orderedList5.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Images/orderedList6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Images/orderedList6.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Images/orderedList7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Images/orderedList7.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Images/orderedList8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Images/orderedList8.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Images/orderedList9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Images/orderedList9.png -------------------------------------------------------------------------------- /src/Sample.Mongo/Models/Movie.cs: -------------------------------------------------------------------------------- 1 | using FlexProviders; 2 | 3 | namespace LogMeIn.Models 4 | { 5 | public class Movie 6 | { 7 | public int Id { get; set; } 8 | public string Title { get; set; } 9 | public int Length { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/Sample.Mongo/Models/Role.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using FlexProviders.Roles; 3 | 4 | namespace LogMeIn.Models 5 | { 6 | public class Role : IFlexRole 7 | { 8 | /// 9 | /// Gets or sets the id. 10 | /// 11 | /// 12 | /// The id. 13 | /// 14 | public int Id { get; set; } 15 | 16 | /// 17 | /// Gets or sets the name. 18 | /// 19 | /// 20 | /// The name. 21 | /// 22 | public string Name { get; set; } 23 | 24 | /// 25 | /// Gets or sets the users. 26 | /// 27 | /// 28 | /// The users. 29 | /// 30 | public ICollection Users { get; set; } 31 | } 32 | } -------------------------------------------------------------------------------- /src/Sample.Mongo/Models/User.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using FlexProviders.Membership; 4 | 5 | namespace LogMeIn.Models 6 | { 7 | public class User : IFlexMembershipUser 8 | { 9 | public string Id { get; set; } 10 | public string Username { get; set; } 11 | public string Password { get; set; } 12 | public string Salt { get; set; } 13 | public string PasswordResetToken { get; set; } 14 | public DateTime PasswordResetTokenExpiration { get; set; } 15 | public int FavoriteNumber { get; set; } 16 | public virtual ICollection OAuthAccounts { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Sample.Mongo/Scripts/_references.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/Scripts/_references.js -------------------------------------------------------------------------------- /src/Sample.Mongo/Security/IUserProfileManager.cs: -------------------------------------------------------------------------------- 1 | namespace LogMeIn.Security 2 | { 3 | // TODO: what parameters are needed? 4 | public interface IUserProfileManager 5 | { 6 | bool Exists(string userName); 7 | void Add(string userName); 8 | } 9 | } -------------------------------------------------------------------------------- /src/Sample.Mongo/Security/ManageMessageId.cs: -------------------------------------------------------------------------------- 1 | namespace LogMeIn 2 | { 3 | public enum ManageMessageId 4 | { 5 | ChangePasswordSuccess, 6 | SetPasswordSuccess, 7 | RemoveLoginSuccess, 8 | } 9 | } -------------------------------------------------------------------------------- /src/Sample.Mongo/Security/UserProfileManager.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using LogMeIn.Models; 3 | 4 | namespace LogMeIn.Security 5 | { 6 | //class UserProfileManager : IUserProfileManager 7 | //{ 8 | // //public bool Exists(string userName) 9 | // //{ 10 | // // using (UsersContext db = new UsersContext()) 11 | // // { 12 | // // return db.UserProfiles.FirstOrDefault(u => u.UserName.ToLower() == userName.ToLower()) != null; 13 | // // } 14 | // //} 15 | 16 | // public void Add(string userName) 17 | // { 18 | // using (UsersContext db = new UsersContext()) 19 | // { 20 | // db.UserProfiles.Add(new UserProfile {UserName = userName}); 21 | // db.SaveChanges(); 22 | // } 23 | // } 24 | //} 25 | } -------------------------------------------------------------------------------- /src/Sample.Mongo/Views/Account/ChangeForgottenPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Models.ChangeForgottenPasswordModel 2 | @{ 3 | ViewBag.Title = "Change Password"; 4 | } 5 | 6 |
7 |

@ViewBag.Title.

8 |

Change password.

9 |
10 | 11 | @using (Html.BeginForm()) { 12 | @Html.AntiForgeryToken() 13 | @Html.ValidationSummary() 14 | 15 |
16 | Forgot Password Form 17 |
    18 |
  1. 19 | @Html.LabelFor(m => m.ResetPasswordToken) 20 | @Html.TextBoxFor(m => m.ResetPasswordToken) 21 |
  2. 22 |
  3. 23 | @Html.LabelFor(m => m.NewPassword) 24 | @Html.PasswordFor(m => m.NewPassword) 25 |
  4. 26 |
  5. 27 | @Html.LabelFor(m => m.ConfirmPassword) 28 | @Html.PasswordFor(m => m.ConfirmPassword) 29 |
  6. 30 |
31 | 32 |
33 | } 34 | 35 | @section Scripts { 36 | @Scripts.Render("~/bundles/jqueryval") 37 | } 38 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Views/Account/ExternalLoginConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Models.RegisterExternalLoginModel 2 | @{ 3 | ViewBag.Title = "Register"; 4 | } 5 | 6 |
7 |

@ViewBag.Title.

8 |

Associate your @ViewBag.ProviderDisplayName account.

9 |
10 | 11 | @using (Html.BeginForm("ExternalLoginConfirmation", "Account", new { ReturnUrl = ViewBag.ReturnUrl })) { 12 | @Html.AntiForgeryToken() 13 | @Html.ValidationSummary(true) 14 | 15 |
16 | Association Form 17 |

18 | You've successfully authenticated with @ViewBag.ProviderDisplayName. 19 | Please enter a user name for this site below and click the Confirm button to finish 20 | logging in. 21 |

22 |
    23 |
  1. 24 | @Html.LabelFor(m => m.UserName) 25 | @Html.TextBoxFor(m => m.UserName) 26 | @Html.ValidationMessageFor(m => m.UserName) 27 |
  2. 28 |
29 | @Html.HiddenFor(m => m.ExternalLoginData) 30 | 31 |
32 | } 33 | 34 | @section Scripts { 35 | @Scripts.Render("~/bundles/jqueryval") 36 | } 37 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Views/Account/ExternalLoginFailure.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Login Failure"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |

Unsuccessful login with service.

8 |
9 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Views/Account/ForgotPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Models.ForgotPasswordModel 2 | @{ 3 | ViewBag.Title = "Forgot Password"; 4 | } 5 | 6 |
7 |

@ViewBag.Title.

8 |

Forgot password.

9 |
10 | 11 | @if (ViewBag.PasswordResetToken != null) { 12 |

An email was sent that contains instructions to change your password.

13 |

@ViewBag.PasswordResetToken

14 | } else { 15 | using (Html.BeginForm()) { 16 | @Html.AntiForgeryToken() 17 | @Html.ValidationSummary() 18 | 19 |
20 | Forgot Password Form 21 |
    22 |
  1. 23 | @Html.LabelFor(m => m.UserName) 24 | @Html.TextBoxFor(m => m.UserName) 25 |
  2. 26 |
27 | 28 |
29 | } 30 | } 31 | 32 | @section Scripts { 33 | @Scripts.Render("~/bundles/jqueryval") 34 | } 35 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Views/Account/Manage.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Models.LocalPasswordModel 2 | @{ 3 | ViewBag.Title = "Manage Account"; 4 | } 5 | 6 |
7 |

@ViewBag.Title.

8 |
9 | 10 |

@ViewBag.StatusMessage

11 | 12 |

You're logged in as @User.Identity.Name.

13 | 14 | @if (ViewBag.HasLocalPassword) 15 | { 16 | @Html.Partial("_ChangePasswordPartial") 17 | } 18 | else 19 | { 20 | @Html.Partial("_SetPasswordPartial") 21 | } 22 | 23 |
24 | @Html.Action("RemoveExternalLogins") 25 | 26 |

Add an external login

27 | @Html.Action("ExternalLoginsList", new { ReturnUrl = ViewBag.ReturnUrl }) 28 |
29 | 30 | @section Scripts { 31 | @Scripts.Render("~/bundles/jqueryval") 32 | } 33 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Views/Account/Register.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Models.RegisterModel 2 | @{ 3 | ViewBag.Title = "Register"; 4 | } 5 | 6 |
7 |

@ViewBag.Title.

8 |

Create a new account.

9 |
10 | 11 | @using (Html.BeginForm()) { 12 | @Html.AntiForgeryToken() 13 | @Html.ValidationSummary() 14 | 15 |
16 | Registration Form 17 |
    18 |
  1. 19 | @Html.LabelFor(m => m.UserName) 20 | @Html.TextBoxFor(m => m.UserName) 21 |
  2. 22 |
  3. 23 | @Html.LabelFor(m => m.Password) 24 | @Html.PasswordFor(m => m.Password) 25 |
  4. 26 |
  5. 27 | @Html.LabelFor(m => m.ConfirmPassword) 28 | @Html.PasswordFor(m => m.ConfirmPassword) 29 |
  6. 30 |
31 | 32 |
33 | } 34 | 35 | @section Scripts { 36 | @Scripts.Render("~/bundles/jqueryval") 37 | } 38 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Views/Account/_ChangePasswordPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Models.LocalPasswordModel 2 | 3 |

Change password

4 | 5 | @using (Html.BeginForm("Manage", "Account")) { 6 | @Html.AntiForgeryToken() 7 | @Html.ValidationSummary() 8 | 9 |
10 | Change Password Form 11 |
    12 |
  1. 13 | @Html.LabelFor(m => m.OldPassword) 14 | @Html.PasswordFor(m => m.OldPassword) 15 |
  2. 16 |
  3. 17 | @Html.LabelFor(m => m.NewPassword) 18 | @Html.PasswordFor(m => m.NewPassword) 19 |
  4. 20 |
  5. 21 | @Html.LabelFor(m => m.ConfirmPassword) 22 | @Html.PasswordFor(m => m.ConfirmPassword) 23 |
  6. 24 |
25 | 26 |
27 | } 28 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Views/Account/_ExternalLoginsListPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model ICollection 2 | 3 | @if (Model.Count == 0) 4 | { 5 |
6 |

There are no external authentication services configured. See this article 7 | for details on setting up this ASP.NET application to support logging in via external services.

8 |
9 | } 10 | else 11 | { 12 | using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = ViewBag.ReturnUrl })) 13 | { 14 | @Html.AntiForgeryToken() 15 |
16 | Log in using another service 17 |

18 | @foreach (AuthenticationClientData p in Model) 19 | { 20 | 21 | } 22 |

23 |
24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Views/Account/_RemoveExternalLoginsPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model ICollection 2 | 3 | @if (Model.Count > 0) 4 | { 5 |

Registered external logins

6 | 7 | 8 | @foreach (LogMeIn.Models.ExternalLogin externalLogin in Model) 9 | { 10 | 11 | 12 | 30 | 31 | } 32 | 33 |
@externalLogin.ProviderDisplayName 13 | @if (ViewBag.ShowRemoveButton) 14 | { 15 | using (Html.BeginForm("Disassociate", "Account")) 16 | { 17 | @Html.AntiForgeryToken() 18 |
19 | @Html.Hidden("provider", externalLogin.Provider) 20 | @Html.Hidden("providerUserId", externalLogin.ProviderUserId) 21 | 22 |
23 | } 24 | } 25 | else 26 | { 27 | @:   28 | } 29 |
34 | } 35 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Views/Account/_SetPasswordPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Models.LocalPasswordModel 2 | 3 |

4 | You do not have a local password for this site. Add a local 5 | password so you can log in without an external login. 6 |

7 | 8 | @using (Html.BeginForm("Manage", "Account")) { 9 | @Html.AntiForgeryToken() 10 | @Html.ValidationSummary() 11 | 12 |
13 | Set Password Form 14 |
    15 |
  1. 16 | @Html.LabelFor(m => m.NewPassword) 17 | @Html.PasswordFor(m => m.NewPassword) 18 |
  2. 19 |
  3. 20 | @Html.LabelFor(m => m.ConfirmPassword) 21 | @Html.PasswordFor(m => m.ConfirmPassword) 22 |
  4. 23 |
24 | 25 |
26 | } 27 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Views/Home/About.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "About"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |

@ViewBag.Message

8 |
9 | 10 |
11 |

12 | Use this area to provide additional information. 13 |

14 | 15 |

16 | Use this area to provide additional information. 17 |

18 | 19 |

20 | Use this area to provide additional information. 21 |

22 |
23 | 24 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Views/Home/Contact.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Contact"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |

@ViewBag.Message

8 |
9 | 10 |
11 |
12 |

Phone

13 |
14 |

15 | Main: 16 | 425.555.0100 17 |

18 |

19 | After Hours: 20 | 425.555.0199 21 |

22 |
23 | 24 |
25 |
26 |

Email

27 |
28 |

29 | Support: 30 | Support@example.com 31 |

32 |

33 | Marketing: 34 | Marketing@example.com 35 |

36 |

37 | General: 38 | General@example.com 39 |

40 |
41 | 42 |
43 |
44 |

Address

45 |
46 |

47 | One Microsoft Way
48 | Redmond, WA 98052-6399 49 |

50 |
-------------------------------------------------------------------------------- /src/Sample.Mongo/Views/Home/Create.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Models.Movie 2 | 3 | @{ 4 | ViewBag.Title = "Create"; 5 | } 6 | 7 |

Create

8 | 9 | @using (Html.BeginForm()) { 10 | @Html.ValidationSummary(true) 11 | 12 |
13 | Movie 14 | 15 |
16 | @Html.LabelFor(model => model.Title) 17 |
18 |
19 | @Html.EditorFor(model => model.Title) 20 | @Html.ValidationMessageFor(model => model.Title) 21 |
22 | 23 |
24 | @Html.LabelFor(model => model.Length) 25 |
26 |
27 | @Html.EditorFor(model => model.Length) 28 | @Html.ValidationMessageFor(model => model.Length) 29 |
30 | 31 |

32 | 33 |

34 |
35 | } 36 | 37 |
38 | @Html.ActionLink("Back to List", "Index") 39 |
40 | 41 | @section Scripts { 42 | @Scripts.Render("~/bundles/jqueryval") 43 | } 44 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Views/Home/Delete.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Models.Movie 2 | 3 | @{ 4 | ViewBag.Title = "Delete"; 5 | } 6 | 7 |

Delete

8 | 9 |

Are you sure you want to delete this?

10 |
11 | Movie 12 | 13 |
14 | @Html.DisplayNameFor(model => model.Title) 15 |
16 |
17 | @Html.DisplayFor(model => model.Title) 18 |
19 | 20 |
21 | @Html.DisplayNameFor(model => model.Length) 22 |
23 |
24 | @Html.DisplayFor(model => model.Length) 25 |
26 |
27 | @using (Html.BeginForm()) { 28 |

29 | | 30 | @Html.ActionLink("Back to List", "Index") 31 |

32 | } 33 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Views/Home/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Models.Movie 2 | 3 | @{ 4 | ViewBag.Title = "Details"; 5 | } 6 | 7 |

Details

8 | 9 |
10 | Movie 11 | 12 |
13 | @Html.DisplayNameFor(model => model.Title) 14 |
15 |
16 | @Html.DisplayFor(model => model.Title) 17 |
18 | 19 |
20 | @Html.DisplayNameFor(model => model.Length) 21 |
22 |
23 | @Html.DisplayFor(model => model.Length) 24 |
25 |
26 |

27 | @Html.ActionLink("Edit", "Edit", new { id=Model.Id }) | 28 | @Html.ActionLink("Back to List", "Index") 29 |

30 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Views/Home/Edit.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Models.Movie 2 | 3 | @{ 4 | ViewBag.Title = "Edit"; 5 | } 6 | 7 |

Edit

8 | 9 | @using (Html.BeginForm()) { 10 | @Html.ValidationSummary(true) 11 | 12 |
13 | Movie 14 | 15 | @Html.HiddenFor(model => model.Id) 16 | 17 |
18 | @Html.LabelFor(model => model.Title) 19 |
20 |
21 | @Html.EditorFor(model => model.Title) 22 | @Html.ValidationMessageFor(model => model.Title) 23 |
24 | 25 |
26 | @Html.LabelFor(model => model.Length) 27 |
28 |
29 | @Html.EditorFor(model => model.Length) 30 | @Html.ValidationMessageFor(model => model.Length) 31 |
32 | 33 |

34 | 35 |

36 |
37 | } 38 | 39 |
40 | @Html.ActionLink("Back to List", "Index") 41 |
42 | 43 | @section Scripts { 44 | @Scripts.Render("~/bundles/jqueryval") 45 | } 46 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model System.Web.Mvc.HandleErrorInfo 2 | 3 | @{ 4 | ViewBag.Title = "Error"; 5 | } 6 | 7 |
8 |

Error.

9 |

An error occurred while processing your request.

10 |
11 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Views/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @if (Request.IsAuthenticated) { 2 | 3 | Hello, @Html.ActionLink(User.Identity.Name, "Manage", "Account", routeValues: null, htmlAttributes: new { @class = "username", title = "Manage" })! 4 | @using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" })) { 5 | @Html.AntiForgeryToken() 6 | Log off 7 | } 8 | 9 | } else { 10 |
    11 |
  • @Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })
  • 12 |
  • @Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })
  • 13 |
14 | } 15 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /src/Sample.Mongo/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /src/Sample.Mongo/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /src/Sample.Mongo/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Mongo/favicon.ico -------------------------------------------------------------------------------- /src/Sample.Raven/App_Start/AuthConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using DotNetOpenAuth.AspNet.Clients; 3 | using FlexProviders.Membership; 4 | using LogMeIn.Raven.Models; 5 | 6 | namespace LogMeIn.Raven 7 | { 8 | public static class AuthConfig 9 | { 10 | public static void RegisterAuth() 11 | { 12 | // To let users of this site log in using their accounts from other sites such as Microsoft, Facebook, and Twitter, 13 | // you must update this site. For more information visit http://go.microsoft.com/fwlink/?LinkID=252166 14 | 15 | //OAuthWebSecurity.RegisterMicrosoftClient( 16 | // clientId: "", 17 | // clientSecret: ""); 18 | 19 | //OAuthWebSecurity.RegisterTwitterClient( 20 | // consumerKey: "", 21 | // consumerSecret: ""); 22 | 23 | //OAuthWebSecurity.RegisterFacebookClient( 24 | // appId: "", 25 | // appSecret: ""); 26 | 27 | //OAuthWebSecurity.RegisterGoogleClient(); 28 | 29 | FlexMembershipProvider.RegisterClient( 30 | new GoogleOpenIdClient(), 31 | "Google", new Dictionary()); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /src/Sample.Raven/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | 4 | namespace LogMeIn.Raven 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Sample.Raven/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | 8 | namespace LogMeIn.Raven 9 | { 10 | public class RouteConfig 11 | { 12 | public static void RegisterRoutes(RouteCollection routes) 13 | { 14 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 15 | 16 | routes.MapRoute( 17 | name: "Default", 18 | url: "{controller}/{action}/{id}", 19 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } 20 | ); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Sample.Raven/App_Start/WebApiConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web.Http; 5 | 6 | namespace LogMeIn.Raven 7 | { 8 | public static class WebApiConfig 9 | { 10 | public static void Register(HttpConfiguration config) 11 | { 12 | config.Routes.MapHttpRoute( 13 | name: "DefaultApi", 14 | routeTemplate: "api/{controller}/{id}", 15 | defaults: new { id = RouteParameter.Optional } 16 | ); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/images/animated-overlay.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/images/animated-overlay.gif -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/jquery.ui.accordion.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Accordion 1.10.0 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2013 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://docs.jquery.com/UI/Accordion#theming 10 | */ 11 | .ui-accordion .ui-accordion-header { 12 | display: block; 13 | cursor: pointer; 14 | position: relative; 15 | margin-top: 2px; 16 | padding: .5em .5em .5em .7em; 17 | min-height: 0; /* support: IE7 */ 18 | } 19 | .ui-accordion .ui-accordion-icons { 20 | padding-left: 2.2em; 21 | } 22 | .ui-accordion .ui-accordion-noicons { 23 | padding-left: .7em; 24 | } 25 | .ui-accordion .ui-accordion-icons .ui-accordion-icons { 26 | padding-left: 2.2em; 27 | } 28 | .ui-accordion .ui-accordion-header .ui-accordion-header-icon { 29 | position: absolute; 30 | left: .5em; 31 | top: 50%; 32 | margin-top: -8px; 33 | } 34 | .ui-accordion .ui-accordion-content { 35 | padding: 1em 2.2em; 36 | border-top: 0; 37 | overflow: auto; 38 | } 39 | -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/jquery.ui.all.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.10.0 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2013 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://docs.jquery.com/UI/Theming 10 | */ 11 | @import "jquery.ui.base.css"; 12 | @import "jquery.ui.theme.css"; 13 | -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/jquery.ui.autocomplete.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Autocomplete 1.10.0 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2013 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://docs.jquery.com/UI/Autocomplete#theming 10 | */ 11 | .ui-autocomplete { 12 | position: absolute; 13 | top: 0; 14 | left: 0; 15 | cursor: default; 16 | } 17 | -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/jquery.ui.base.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.10.0 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2013 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://docs.jquery.com/UI/Theming 10 | */ 11 | @import url("jquery.ui.core.css"); 12 | 13 | @import url("jquery.ui.accordion.css"); 14 | @import url("jquery.ui.autocomplete.css"); 15 | @import url("jquery.ui.button.css"); 16 | @import url("jquery.ui.datepicker.css"); 17 | @import url("jquery.ui.dialog.css"); 18 | @import url("jquery.ui.menu.css"); 19 | @import url("jquery.ui.progressbar.css"); 20 | @import url("jquery.ui.resizable.css"); 21 | @import url("jquery.ui.selectable.css"); 22 | @import url("jquery.ui.slider.css"); 23 | @import url("jquery.ui.spinner.css"); 24 | @import url("jquery.ui.tabs.css"); 25 | @import url("jquery.ui.tooltip.css"); 26 | -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/jquery.ui.progressbar.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Progressbar 1.10.0 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2013 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://docs.jquery.com/UI/Progressbar#theming 10 | */ 11 | .ui-progressbar { 12 | height: 2em; 13 | text-align: left; 14 | overflow: hidden; 15 | } 16 | .ui-progressbar .ui-progressbar-value { 17 | margin: -1px; 18 | height: 100%; 19 | } 20 | .ui-progressbar .ui-progressbar-overlay { 21 | background: url("images/animated-overlay.gif"); 22 | height: 100%; 23 | filter: alpha(opacity=25); 24 | opacity: 0.25; 25 | } 26 | .ui-progressbar-indeterminate .ui-progressbar-value { 27 | background-image: none; 28 | } 29 | -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/jquery.ui.selectable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Selectable 1.10.0 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2013 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://docs.jquery.com/UI/Selectable#theming 10 | */ 11 | .ui-selectable-helper { 12 | position: absolute; 13 | z-index: 100; 14 | border: 1px dotted black; 15 | } 16 | -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/jquery.ui.tooltip.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Tooltip 1.10.0 3 | * http://jqueryui.com 4 | * 5 | * Copyright 2013 jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | */ 9 | .ui-tooltip { 10 | padding: 8px; 11 | position: absolute; 12 | z-index: 9999; 13 | max-width: 300px; 14 | -webkit-box-shadow: 0 0 5px #aaa; 15 | box-shadow: 0 0 5px #aaa; 16 | } 17 | body .ui-tooltip { 18 | border-width: 2px; 19 | } 20 | -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/images/animated-overlay.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/minified/images/animated-overlay.gif -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/minified/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/minified/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/minified/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/minified/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/minified/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/minified/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/minified/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/minified/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/minified/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/minified/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/minified/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/minified/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Content/themes/base/minified/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/jquery.ui.accordion.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.10.0 - 2013-01-17 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.accordion.css 4 | * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ 5 | .ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;min-height:0}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto} -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/jquery.ui.autocomplete.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.10.0 - 2013-01-17 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.autocomplete.css 4 | * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ 5 | .ui-autocomplete{position:absolute;top:0;left:0;cursor:default} -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/jquery.ui.core.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.10.0 - 2013-01-17 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.core.css 4 | * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ 5 | .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%} -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/jquery.ui.dialog.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.10.0 - 2013-01-17 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.dialog.css 4 | * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ 5 | .ui-dialog{position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:21px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move} -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/jquery.ui.menu.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.10.0 - 2013-01-17 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.menu.css 4 | * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ 5 | .ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:none}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;width:100%}.ui-menu .ui-menu-divider{margin:5px -2px 5px -2px;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:2px .4em;line-height:1.5;min-height:0;font-weight:normal}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px}.ui-menu .ui-state-disabled{font-weight:normal;margin:.4em 0 .2em;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right} -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/jquery.ui.progressbar.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.10.0 - 2013-01-17 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.progressbar.css 4 | * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ 5 | .ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("images/animated-overlay.gif");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none} -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/jquery.ui.resizable.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.10.0 - 2013-01-17 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.resizable.css 4 | * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ 5 | .ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px} -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/jquery.ui.selectable.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.10.0 - 2013-01-17 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.selectable.css 4 | * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ 5 | .ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black} -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/jquery.ui.slider.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.10.0 - 2013-01-17 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.slider.css 4 | * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ 5 | .ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0} -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/jquery.ui.spinner.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.10.0 - 2013-01-17 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.spinner.css 4 | * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ 5 | .ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px} -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/jquery.ui.tabs.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.10.0 - 2013-01-17 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.tabs.css 4 | * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ 5 | .ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-tabs-loading a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none} -------------------------------------------------------------------------------- /src/Sample.Raven/Content/themes/base/minified/jquery.ui.tooltip.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.10.0 - 2013-01-17 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.tooltip.css 4 | * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ 5 | .ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px} -------------------------------------------------------------------------------- /src/Sample.Raven/Controllers/AdminController.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using LogMeIn.Raven.Filters; 3 | 4 | namespace LogMeIn.Raven.Controllers 5 | { 6 | public class AdminController : Controller 7 | { 8 | // 9 | // GET: /Admin/ 10 | [FlexAuthorize(Roles="admin")] 11 | public ActionResult Index() 12 | { 13 | return Content("You can see me!"); 14 | } 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Sample.Raven/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | 3 | namespace LogMeIn.Raven.Controllers 4 | { 5 | [Authorize] 6 | public class HomeController : Controller 7 | { 8 | // 9 | // GET: /Home/ 10 | 11 | public ActionResult Index() 12 | { 13 | return View(); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /src/Sample.Raven/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="LogMeIn.Raven.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /src/Sample.Raven/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Http; 6 | using System.Web.Mvc; 7 | using System.Web.Optimization; 8 | using System.Web.Routing; 9 | 10 | namespace LogMeIn.Raven 11 | { 12 | // Note: For instructions on enabling IIS6 or IIS7 classic mode, 13 | // visit http://go.microsoft.com/?LinkId=9394801 14 | 15 | public class MvcApplication : System.Web.HttpApplication 16 | { 17 | protected void Application_Start() 18 | { 19 | AreaRegistration.RegisterAllAreas(); 20 | 21 | WebApiConfig.Register(GlobalConfiguration.Configuration); 22 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 23 | RouteConfig.RegisterRoutes(RouteTable.Routes); 24 | BundleConfig.RegisterBundles(BundleTable.Bundles); 25 | AuthConfig.RegisterAuth(); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/Sample.Raven/Images/accent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Images/accent.png -------------------------------------------------------------------------------- /src/Sample.Raven/Images/bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Images/bullet.png -------------------------------------------------------------------------------- /src/Sample.Raven/Images/heroAccent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Images/heroAccent.png -------------------------------------------------------------------------------- /src/Sample.Raven/Images/orderedList0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Images/orderedList0.png -------------------------------------------------------------------------------- /src/Sample.Raven/Images/orderedList1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Images/orderedList1.png -------------------------------------------------------------------------------- /src/Sample.Raven/Images/orderedList2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Images/orderedList2.png -------------------------------------------------------------------------------- /src/Sample.Raven/Images/orderedList3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Images/orderedList3.png -------------------------------------------------------------------------------- /src/Sample.Raven/Images/orderedList4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Images/orderedList4.png -------------------------------------------------------------------------------- /src/Sample.Raven/Images/orderedList5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Images/orderedList5.png -------------------------------------------------------------------------------- /src/Sample.Raven/Images/orderedList6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Images/orderedList6.png -------------------------------------------------------------------------------- /src/Sample.Raven/Images/orderedList7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Images/orderedList7.png -------------------------------------------------------------------------------- /src/Sample.Raven/Images/orderedList8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Images/orderedList8.png -------------------------------------------------------------------------------- /src/Sample.Raven/Images/orderedList9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Images/orderedList9.png -------------------------------------------------------------------------------- /src/Sample.Raven/Models/Role.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.ObjectModel; 3 | using FlexProviders.Roles; 4 | 5 | namespace LogMeIn.Raven.Models 6 | { 7 | public class Role : IFlexRole 8 | { 9 | public Role() 10 | { 11 | Users = new Collection(); 12 | } 13 | 14 | /// 15 | /// Gets or sets the id. 16 | /// 17 | /// 18 | /// The id. 19 | /// 20 | public int Id { get; set; } 21 | 22 | /// 23 | /// Gets or sets the name. 24 | /// 25 | /// 26 | /// The name. 27 | /// 28 | public string Name { get; set; } 29 | 30 | /// 31 | /// Gets or sets the users. 32 | /// 33 | /// 34 | /// The users. 35 | /// 36 | public ICollection Users { get; set; } 37 | } 38 | } -------------------------------------------------------------------------------- /src/Sample.Raven/Models/User.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Collections.ObjectModel; 4 | using FlexProviders.Membership; 5 | 6 | namespace LogMeIn.Raven.Models 7 | { 8 | public class User : IFlexMembershipUser 9 | { 10 | public User() 11 | { 12 | OAuthAccounts = new Collection(); 13 | } 14 | 15 | public string Id { get; set; } 16 | public string Username { get; set; } 17 | public string Password { get; set; } 18 | public string Salt { get; set; } 19 | public string PasswordResetToken { get; set; } 20 | public DateTime PasswordResetTokenExpiration { get; set; } 21 | public int FavoriteNumber { get; set; } 22 | public virtual ICollection OAuthAccounts { get; set; } 23 | } 24 | } -------------------------------------------------------------------------------- /src/Sample.Raven/Scripts/_references.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/Scripts/_references.js -------------------------------------------------------------------------------- /src/Sample.Raven/Security/ManageMessageId.cs: -------------------------------------------------------------------------------- 1 | namespace LogMeIn.Raven.Security 2 | { 3 | public enum ManageMessageId 4 | { 5 | ChangePasswordSuccess, 6 | SetPasswordSuccess, 7 | RemoveLoginSuccess, 8 | } 9 | } -------------------------------------------------------------------------------- /src/Sample.Raven/Views/Account/ChangeForgottenPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Raven.Models.ChangeForgottenPasswordModel 2 | @{ 3 | ViewBag.Title = "Change Password"; 4 | } 5 | 6 |
7 |

@ViewBag.Title.

8 |

Change password.

9 |
10 | 11 | @using (Html.BeginForm()) { 12 | @Html.AntiForgeryToken() 13 | @Html.ValidationSummary() 14 | 15 |
16 | Forgot Password Form 17 |
    18 |
  1. 19 | @Html.LabelFor(m => m.ResetPasswordToken) 20 | @Html.TextBoxFor(m => m.ResetPasswordToken) 21 |
  2. 22 |
  3. 23 | @Html.LabelFor(m => m.NewPassword) 24 | @Html.PasswordFor(m => m.NewPassword) 25 |
  4. 26 |
  5. 27 | @Html.LabelFor(m => m.ConfirmPassword) 28 | @Html.PasswordFor(m => m.ConfirmPassword) 29 |
  6. 30 |
31 | 32 |
33 | } 34 | 35 | @section Scripts { 36 | @Scripts.Render("~/bundles/jqueryval") 37 | } 38 | -------------------------------------------------------------------------------- /src/Sample.Raven/Views/Account/ExternalLoginConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Raven.Models.RegisterExternalLoginModel 2 | @{ 3 | ViewBag.Title = "Register"; 4 | } 5 | 6 |
7 |

@ViewBag.Title.

8 |

Associate your @ViewBag.ProviderDisplayName account.

9 |
10 | 11 | @using (Html.BeginForm("ExternalLoginConfirmation", "Account", new { ReturnUrl = ViewBag.ReturnUrl })) { 12 | @Html.AntiForgeryToken() 13 | @Html.ValidationSummary(true) 14 | 15 |
16 | Association Form 17 |

18 | You've successfully authenticated with @ViewBag.ProviderDisplayName. 19 | Please enter a user name for this site below and click the Confirm button to finish 20 | logging in. 21 |

22 |
    23 |
  1. 24 | @Html.LabelFor(m => m.UserName) 25 | @Html.TextBoxFor(m => m.UserName) 26 | @Html.ValidationMessageFor(m => m.UserName) 27 |
  2. 28 |
29 | @Html.HiddenFor(m => m.ExternalLoginData) 30 | 31 |
32 | } 33 | 34 | @section Scripts { 35 | @Scripts.Render("~/bundles/jqueryval") 36 | } 37 | -------------------------------------------------------------------------------- /src/Sample.Raven/Views/Account/ExternalLoginFailure.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Login Failure"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |

Unsuccessful login with service.

8 |
9 | -------------------------------------------------------------------------------- /src/Sample.Raven/Views/Account/ForgotPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Raven.Models.ForgotPasswordModel 2 | @{ 3 | ViewBag.Title = "Forgot Password"; 4 | } 5 | 6 |
7 |

@ViewBag.Title.

8 |

Forgot password.

9 |
10 | 11 | @if (ViewBag.PasswordResetToken != null) { 12 |

An email was sent that contains instructions to change your password.

13 |

@ViewBag.PasswordResetToken

14 | } else { 15 | using (Html.BeginForm()) { 16 | @Html.AntiForgeryToken() 17 | @Html.ValidationSummary() 18 | 19 |
20 | Forgot Password Form 21 |
    22 |
  1. 23 | @Html.LabelFor(m => m.UserName) 24 | @Html.TextBoxFor(m => m.UserName) 25 |
  2. 26 |
27 | 28 |
29 | } 30 | } 31 | 32 | @section Scripts { 33 | @Scripts.Render("~/bundles/jqueryval") 34 | } 35 | -------------------------------------------------------------------------------- /src/Sample.Raven/Views/Account/Manage.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Raven.Models.LocalPasswordModel 2 | @{ 3 | ViewBag.Title = "Manage Account"; 4 | } 5 | 6 |
7 |

@ViewBag.Title.

8 |
9 | 10 |

@ViewBag.StatusMessage

11 | 12 |

You're logged in as @User.Identity.Name.

13 | 14 | @if (ViewBag.HasLocalPassword) 15 | { 16 | @Html.Partial("_ChangePasswordPartial") 17 | } 18 | else 19 | { 20 | @Html.Partial("_SetPasswordPartial") 21 | } 22 | 23 |
24 | @Html.Action("RemoveExternalLogins") 25 | 26 |

Add an external login

27 | @Html.Action("ExternalLoginsList", new { ReturnUrl = ViewBag.ReturnUrl }) 28 |
29 | 30 | @section Scripts { 31 | @Scripts.Render("~/bundles/jqueryval") 32 | } 33 | -------------------------------------------------------------------------------- /src/Sample.Raven/Views/Account/Register.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Raven.Models.RegisterModel 2 | @{ 3 | ViewBag.Title = "Register"; 4 | } 5 | 6 |
7 |

@ViewBag.Title.

8 |

Create a new account.

9 |
10 | 11 | @using (Html.BeginForm()) { 12 | @Html.AntiForgeryToken() 13 | @Html.ValidationSummary() 14 | 15 |
16 | Registration Form 17 |
    18 |
  1. 19 | @Html.LabelFor(m => m.UserName) 20 | @Html.TextBoxFor(m => m.UserName) 21 |
  2. 22 |
  3. 23 | @Html.LabelFor(m => m.Password) 24 | @Html.PasswordFor(m => m.Password) 25 |
  4. 26 |
  5. 27 | @Html.LabelFor(m => m.ConfirmPassword) 28 | @Html.PasswordFor(m => m.ConfirmPassword) 29 |
  6. 30 |
31 | 32 |
33 | } 34 | 35 | @section Scripts { 36 | @Scripts.Render("~/bundles/jqueryval") 37 | } 38 | -------------------------------------------------------------------------------- /src/Sample.Raven/Views/Account/_ChangePasswordPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Raven.Models.LocalPasswordModel 2 | 3 |

Change password

4 | 5 | @using (Html.BeginForm("Manage", "Account")) { 6 | @Html.AntiForgeryToken() 7 | @Html.ValidationSummary() 8 | 9 |
10 | Change Password Form 11 |
    12 |
  1. 13 | @Html.LabelFor(m => m.OldPassword) 14 | @Html.PasswordFor(m => m.OldPassword) 15 |
  2. 16 |
  3. 17 | @Html.LabelFor(m => m.NewPassword) 18 | @Html.PasswordFor(m => m.NewPassword) 19 |
  4. 20 |
  5. 21 | @Html.LabelFor(m => m.ConfirmPassword) 22 | @Html.PasswordFor(m => m.ConfirmPassword) 23 |
  6. 24 |
25 | 26 |
27 | } 28 | -------------------------------------------------------------------------------- /src/Sample.Raven/Views/Account/_ExternalLoginsListPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model ICollection 2 | 3 | @if (Model.Count == 0) 4 | { 5 |
6 |

There are no external authentication services configured. See this article 7 | for details on setting up this ASP.NET application to support logging in via external services.

8 |
9 | } 10 | else 11 | { 12 | using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = ViewBag.ReturnUrl })) 13 | { 14 | @Html.AntiForgeryToken() 15 |
16 | Log in using another service 17 |

18 | @foreach (AuthenticationClientData p in Model) 19 | { 20 | 21 | } 22 |

23 |
24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Sample.Raven/Views/Account/_RemoveExternalLoginsPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model ICollection 2 | 3 | @if (Model.Count > 0) 4 | { 5 |

Registered external logins

6 | 7 | 8 | @foreach (LogMeIn.Raven.Models.ExternalLogin externalLogin in Model) 9 | { 10 | 11 | 12 | 30 | 31 | } 32 | 33 |
@externalLogin.ProviderDisplayName 13 | @if (ViewBag.ShowRemoveButton) 14 | { 15 | using (Html.BeginForm("Disassociate", "Account")) 16 | { 17 | @Html.AntiForgeryToken() 18 |
19 | @Html.Hidden("provider", externalLogin.Provider) 20 | @Html.Hidden("providerUserId", externalLogin.ProviderUserId) 21 | 22 |
23 | } 24 | } 25 | else 26 | { 27 | @:   28 | } 29 |
34 | } 35 | -------------------------------------------------------------------------------- /src/Sample.Raven/Views/Account/_SetPasswordPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Raven.Models.LocalPasswordModel 2 | 3 |

4 | You do not have a local password for this site. Add a local 5 | password so you can log in without an external login. 6 |

7 | 8 | @using (Html.BeginForm("Manage", "Account")) { 9 | @Html.AntiForgeryToken() 10 | @Html.ValidationSummary() 11 | 12 |
13 | Set Password Form 14 |
    15 |
  1. 16 | @Html.LabelFor(m => m.NewPassword) 17 | @Html.PasswordFor(m => m.NewPassword) 18 |
  2. 19 |
  3. 20 | @Html.LabelFor(m => m.ConfirmPassword) 21 | @Html.PasswordFor(m => m.ConfirmPassword) 22 |
  4. 23 |
24 | 25 |
26 | } 27 | -------------------------------------------------------------------------------- /src/Sample.Raven/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model System.Web.Mvc.HandleErrorInfo 2 | 3 | @{ 4 | ViewBag.Title = "Error"; 5 | } 6 | 7 |
8 |

Error.

9 |

An error occurred while processing your request.

10 |
11 | -------------------------------------------------------------------------------- /src/Sample.Raven/Views/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @if (Request.IsAuthenticated) { 2 | 3 | Hello, @Html.ActionLink(User.Identity.Name, "Manage", "Account", routeValues: null, htmlAttributes: new { @class = "username", title = "Manage" })! 4 | @using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" })) { 5 | @Html.AntiForgeryToken() 6 | Log off 7 | } 8 | 9 | } else { 10 |
    11 |
  • @Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })
  • 12 |
  • @Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })
  • 13 |
14 | } 15 | -------------------------------------------------------------------------------- /src/Sample.Raven/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /src/Sample.Raven/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /src/Sample.Raven/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample.Raven/favicon.ico -------------------------------------------------------------------------------- /src/Sample/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | 4 | namespace LogMeIn 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Sample/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | 8 | namespace LogMeIn 9 | { 10 | public class RouteConfig 11 | { 12 | public static void RegisterRoutes(RouteCollection routes) 13 | { 14 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 15 | 16 | routes.MapRoute( 17 | name: "Default", 18 | url: "{controller}/{action}/{id}", 19 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } 20 | ); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Sample/App_Start/StructuremapMvc.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using StructureMap; 3 | 4 | [assembly: WebActivator.PreApplicationStartMethod(typeof(LogMeIn.App_Start.StructuremapMvc), "Start")] 5 | 6 | namespace LogMeIn.App_Start { 7 | public static class StructuremapMvc { 8 | public static void Start() { 9 | var container = IoC.Initialize(); 10 | DependencyResolver.SetResolver(new SmDependencyResolver(container)); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Sample/App_Start/WebApiConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web.Http; 5 | 6 | namespace LogMeIn 7 | { 8 | public static class WebApiConfig 9 | { 10 | public static void Register(HttpConfiguration config) 11 | { 12 | config.Routes.MapHttpRoute( 13 | name: "DefaultApi", 14 | routeTemplate: "api/{controller}/{id}", 15 | defaults: new { id = RouteParameter.Optional } 16 | ); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/jquery.ui.accordion.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Accordion 1.8.20 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Accordion#theming 9 | */ 10 | /* IE/Win - Fix animation bug - #4615 */ 11 | .ui-accordion { width: 100%; } 12 | .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } 13 | .ui-accordion .ui-accordion-li-fix { display: inline; } 14 | .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } 15 | .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } 16 | .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } 17 | .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } 18 | .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } 19 | .ui-accordion .ui-accordion-content-active { display: block; } 20 | -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/jquery.ui.all.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.8.20 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Theming 9 | */ 10 | @import "jquery.ui.base.css"; 11 | @import "jquery.ui.theme.css"; 12 | -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/jquery.ui.autocomplete.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Autocomplete 1.8.20 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Autocomplete#theming 9 | */ 10 | .ui-autocomplete { position: absolute; cursor: default; } 11 | 12 | /* workarounds */ 13 | * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ 14 | 15 | /* 16 | * jQuery UI Menu 1.8.20 17 | * 18 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 19 | * Licensed under the MIT license. 20 | * http://jquery.org/license 21 | * 22 | * http://docs.jquery.com/UI/Menu#theming 23 | */ 24 | .ui-menu { 25 | list-style:none; 26 | padding: 2px; 27 | margin: 0; 28 | display:block; 29 | float: left; 30 | } 31 | .ui-menu .ui-menu { 32 | margin-top: -3px; 33 | } 34 | .ui-menu .ui-menu-item { 35 | margin:0; 36 | padding: 0; 37 | zoom: 1; 38 | float: left; 39 | clear: left; 40 | width: 100%; 41 | } 42 | .ui-menu .ui-menu-item a { 43 | text-decoration:none; 44 | display:block; 45 | padding:.2em .4em; 46 | line-height:1.5; 47 | zoom:1; 48 | } 49 | .ui-menu .ui-menu-item a.ui-state-hover, 50 | .ui-menu .ui-menu-item a.ui-state-active { 51 | font-weight: normal; 52 | margin: -1px; 53 | } 54 | -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/jquery.ui.base.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.8.20 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Theming 9 | */ 10 | @import url("jquery.ui.core.css"); 11 | 12 | @import url("jquery.ui.accordion.css"); 13 | @import url("jquery.ui.autocomplete.css"); 14 | @import url("jquery.ui.button.css"); 15 | @import url("jquery.ui.datepicker.css"); 16 | @import url("jquery.ui.dialog.css"); 17 | @import url("jquery.ui.progressbar.css"); 18 | @import url("jquery.ui.resizable.css"); 19 | @import url("jquery.ui.selectable.css"); 20 | @import url("jquery.ui.slider.css"); 21 | @import url("jquery.ui.tabs.css"); 22 | -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/jquery.ui.progressbar.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Progressbar 1.8.20 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Progressbar#theming 9 | */ 10 | .ui-progressbar { height:2em; text-align: left; overflow: hidden; } 11 | .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/jquery.ui.resizable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Resizable 1.8.20 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Resizable#theming 9 | */ 10 | .ui-resizable { position: relative;} 11 | .ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; } 12 | .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } 13 | .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } 14 | .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } 15 | .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } 16 | .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } 17 | .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } 18 | .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } 19 | .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } 20 | .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;} -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/jquery.ui.selectable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Selectable 1.8.20 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Selectable#theming 9 | */ 10 | .ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } 11 | -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/jquery.ui.slider.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Slider 1.8.20 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Licensed under the MIT license. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Slider#theming 9 | */ 10 | .ui-slider { position: relative; text-align: left; } 11 | .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } 12 | .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } 13 | 14 | .ui-slider-horizontal { height: .8em; } 15 | .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } 16 | .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } 17 | .ui-slider-horizontal .ui-slider-range-min { left: 0; } 18 | .ui-slider-horizontal .ui-slider-range-max { right: 0; } 19 | 20 | .ui-slider-vertical { width: .8em; height: 100px; } 21 | .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } 22 | .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } 23 | .ui-slider-vertical .ui-slider-range-min { bottom: 0; } 24 | .ui-slider-vertical .ui-slider-range-max { top: 0; } -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/minified/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/minified/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/minified/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/minified/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/minified/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/minified/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/minified/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/minified/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/minified/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/minified/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/minified/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/minified/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/minified/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/minified/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/minified/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/minified/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/minified/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/minified/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/minified/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/minified/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/minified/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/minified/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/minified/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/minified/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/minified/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Content/themes/base/minified/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/minified/jquery.ui.accordion.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.20 - 2012-04-30 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.accordion.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-accordion{width:100%}.ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1}.ui-accordion .ui-accordion-li-fix{display:inline}.ui-accordion .ui-accordion-header-active{border-bottom:0!important}.ui-accordion .ui-accordion-header a{display:block;font-size:1em;padding:.5em .5em .5em .7em}.ui-accordion-icons .ui-accordion-header a{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;margin-top:-2px;position:relative;top:1px;margin-bottom:2px;overflow:auto;display:none;zoom:1}.ui-accordion .ui-accordion-content-active{display:block} -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/minified/jquery.ui.autocomplete.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.20 - 2012-04-30 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.autocomplete.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-autocomplete{position:absolute;cursor:default}* html .ui-autocomplete{width:1px}.ui-menu{list-style:none;padding:2px;margin:0;display:block;float:left}.ui-menu .ui-menu{margin-top:-3px}.ui-menu .ui-menu-item{margin:0;padding:0;zoom:1;float:left;clear:left;width:100%}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:.2em .4em;line-height:1.5;zoom:1}.ui-menu .ui-menu-item a.ui-state-hover,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px} -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/minified/jquery.ui.core.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.20 - 2012-04-30 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.core.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{position:absolute!important;clip:rect(1px);clip:rect(1px,1px,1px,1px)}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{zoom:1}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%} -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/minified/jquery.ui.dialog.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.20 - 2012-04-30 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.dialog.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-dialog{position:absolute;padding:.2em;width:300px;overflow:hidden}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 16px .1em 0}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px}.ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px}.ui-dialog .ui-dialog-titlebar-close:hover,.ui-dialog .ui-dialog-titlebar-close:focus{padding:0}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto;zoom:1}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px}.ui-draggable .ui-dialog-titlebar{cursor:move} -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/minified/jquery.ui.progressbar.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.20 - 2012-04-30 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.progressbar.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%} -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/minified/jquery.ui.resizable.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.20 - 2012-04-30 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.resizable.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px} -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/minified/jquery.ui.selectable.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.20 - 2012-04-30 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.selectable.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black} -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/minified/jquery.ui.slider.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.20 - 2012-04-30 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.slider.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0} -------------------------------------------------------------------------------- /src/Sample/Content/themes/base/minified/jquery.ui.tabs.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.8.20 - 2012-04-30 2 | * https://github.com/jquery/jquery-ui 3 | * Includes: jquery.ui.tabs.css 4 | * Copyright (c) 2012 AUTHORS.txt; Licensed MIT */ 5 | .ui-tabs{position:relative;padding:.2em;zoom:1}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:1px;margin:0 .2em 1px 0;border-bottom:0!important;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-selected{margin-bottom:0;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-selected a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-state-processing a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tabs .ui-tabs-hide{display:none!important} -------------------------------------------------------------------------------- /src/Sample/Controllers/AdminController.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using LogMeIn.Filters; 3 | 4 | namespace LogMeIn.Controllers 5 | { 6 | public class AdminController : Controller 7 | { 8 | // 9 | // GET: /Admin/ 10 | [FlexAuthorize(Roles="admin")] 11 | public ActionResult Index() 12 | { 13 | return Content("You can see me!"); 14 | } 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Sample/DependencyResolution/SmDependencyResolver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web.Mvc; 5 | using StructureMap; 6 | 7 | namespace LogMeIn 8 | { 9 | public class SmDependencyResolver : IDependencyResolver { 10 | 11 | private readonly IContainer _container; 12 | 13 | public SmDependencyResolver(IContainer container) { 14 | _container = container; 15 | } 16 | 17 | public object GetService(Type serviceType) { 18 | if (serviceType == null) return null; 19 | try { 20 | return serviceType.IsAbstract || serviceType.IsInterface 21 | ? _container.TryGetInstance(serviceType) 22 | : _container.GetInstance(serviceType); 23 | } 24 | catch { 25 | 26 | return null; 27 | } 28 | } 29 | 30 | public IEnumerable GetServices(Type serviceType) { 31 | return _container.GetAllInstances(serviceType).Cast(); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /src/Sample/DependencyResolution/SmFilterProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Web.Mvc; 3 | using StructureMap; 4 | 5 | namespace LogMeIn 6 | { 7 | public class SmFilterProvider : FilterAttributeFilterProvider 8 | { 9 | public SmFilterProvider(IContainer container) 10 | { 11 | _container = container; 12 | } 13 | 14 | public override IEnumerable GetFilters(ControllerContext controllerContext, ActionDescriptor actionDescriptor) 15 | { 16 | var filters = base.GetFilters(controllerContext, actionDescriptor); 17 | 18 | foreach (var filter in filters) 19 | { 20 | _container.BuildUp(filter.Instance); 21 | } 22 | 23 | return filters; 24 | } 25 | 26 | private IContainer _container; 27 | } 28 | } -------------------------------------------------------------------------------- /src/Sample/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="LogMeIn.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /src/Sample/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Http; 2 | using System.Web.Mvc; 3 | using System.Web.Optimization; 4 | using System.Web.Routing; 5 | 6 | namespace LogMeIn 7 | { 8 | public class MvcApplication : System.Web.HttpApplication 9 | { 10 | protected void Application_Start() 11 | { 12 | AreaRegistration.RegisterAllAreas(); 13 | WebApiConfig.Register(GlobalConfiguration.Configuration); 14 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 15 | RouteConfig.RegisterRoutes(RouteTable.Routes); 16 | BundleConfig.RegisterBundles(BundleTable.Bundles); 17 | AuthConfig.RegisterAuth(); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Sample/Images/accent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Images/accent.png -------------------------------------------------------------------------------- /src/Sample/Images/bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Images/bullet.png -------------------------------------------------------------------------------- /src/Sample/Images/heroAccent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Images/heroAccent.png -------------------------------------------------------------------------------- /src/Sample/Images/orderedList0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Images/orderedList0.png -------------------------------------------------------------------------------- /src/Sample/Images/orderedList1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Images/orderedList1.png -------------------------------------------------------------------------------- /src/Sample/Images/orderedList2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Images/orderedList2.png -------------------------------------------------------------------------------- /src/Sample/Images/orderedList3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Images/orderedList3.png -------------------------------------------------------------------------------- /src/Sample/Images/orderedList4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Images/orderedList4.png -------------------------------------------------------------------------------- /src/Sample/Images/orderedList5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Images/orderedList5.png -------------------------------------------------------------------------------- /src/Sample/Images/orderedList6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Images/orderedList6.png -------------------------------------------------------------------------------- /src/Sample/Images/orderedList7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Images/orderedList7.png -------------------------------------------------------------------------------- /src/Sample/Images/orderedList8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Images/orderedList8.png -------------------------------------------------------------------------------- /src/Sample/Images/orderedList9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Images/orderedList9.png -------------------------------------------------------------------------------- /src/Sample/Migrations/201209221621381_Create.Designer.cs: -------------------------------------------------------------------------------- 1 | // 2 | namespace LogMeIn.Migrations 3 | { 4 | using System.Data.Entity.Migrations; 5 | using System.Data.Entity.Migrations.Infrastructure; 6 | using System.Resources; 7 | 8 | public sealed partial class Create : IMigrationMetadata 9 | { 10 | private readonly ResourceManager Resources = new ResourceManager(typeof(Create)); 11 | 12 | string IMigrationMetadata.Id 13 | { 14 | get { return "201209221621381_Create"; } 15 | } 16 | 17 | string IMigrationMetadata.Source 18 | { 19 | get { return null; } 20 | } 21 | 22 | string IMigrationMetadata.Target 23 | { 24 | get { return Resources.GetString("Target"); } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Sample/Models/ManageMessageId.cs: -------------------------------------------------------------------------------- 1 | namespace LogMeIn.Models 2 | { 3 | public enum ManageMessageId 4 | { 5 | ChangePasswordSuccess, 6 | SetPasswordSuccess, 7 | RemoveLoginSuccess 8 | } 9 | } -------------------------------------------------------------------------------- /src/Sample/Models/Movie.cs: -------------------------------------------------------------------------------- 1 | using FlexProviders; 2 | 3 | namespace LogMeIn.Models 4 | { 5 | public class Movie 6 | { 7 | public int Id { get; set; } 8 | public string Title { get; set; } 9 | public int Length { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/Sample/Models/MovieDb.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity; 2 | using FlexProviders.Membership; 3 | 4 | namespace LogMeIn.Models 5 | { 6 | public class MovieDb : DbContext 7 | { 8 | public MovieDb() 9 | { 10 | } 11 | 12 | public MovieDb(string connectionStringOrName) 13 | : base(connectionStringOrName) 14 | { 15 | } 16 | 17 | public DbSet Movies { get; set; } 18 | public DbSet Users { get; set; } 19 | public DbSet Roles { get; set; } 20 | 21 | protected override void OnModelCreating(DbModelBuilder modelBuilder) 22 | { 23 | modelBuilder.Entity().HasKey(a => new { a.Provider, a.ProviderUserId }); 24 | base.OnModelCreating(modelBuilder); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/Sample/Models/Role.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using FlexProviders.Roles; 3 | 4 | namespace LogMeIn.Models 5 | { 6 | public class Role : IFlexRole 7 | { 8 | public int Id { get; set; } 9 | public string Name { get; set; } 10 | public ICollection Users { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/Sample/Models/RoleStore.cs: -------------------------------------------------------------------------------- 1 | using FlexProviders.EF; 2 | 3 | namespace LogMeIn.Models 4 | { 5 | public class RoleStore : FlexRoleStore 6 | { 7 | public RoleStore(MovieDb db) : base(db) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /src/Sample/Models/User.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using FlexProviders.Membership; 4 | 5 | namespace LogMeIn.Models 6 | { 7 | public class User : IFlexMembershipUser 8 | { 9 | public User() 10 | { 11 | PasswordResetTokenExpiration = DateTime.Now; 12 | } 13 | 14 | public int Id { get; set; } 15 | public string Group { get; set; } 16 | public string Username { get; set; } 17 | public string Password { get; set; } 18 | public string Email { get; set; } 19 | public string Salt { get; set; } 20 | public string PasswordResetToken { get; set; } 21 | public DateTime PasswordResetTokenExpiration { get; set; } 22 | public bool IsLocal { get; set; } 23 | public int FavoriteNumber { get; set; } 24 | public virtual ICollection OAuthAccounts { get; set; } 25 | public ICollection Roles { get; set; } 26 | } 27 | } -------------------------------------------------------------------------------- /src/Sample/Models/UserStore.cs: -------------------------------------------------------------------------------- 1 | using FlexProviders.EF; 2 | 3 | namespace LogMeIn.Models 4 | { 5 | public class UserStore : FlexMembershipUserStore 6 | { 7 | public UserStore(MovieDb db) : base(db) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /src/Sample/Scripts/_references.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/Scripts/_references.js -------------------------------------------------------------------------------- /src/Sample/Views/Account/ExternalLoginConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Models.RegisterExternalLoginModel 2 | @{ 3 | ViewBag.Title = "Register"; 4 | } 5 | 6 |
7 |

@ViewBag.Title.

8 |

Associate your @ViewBag.ProviderDisplayName account.

9 |
10 | 11 | @using (Html.BeginForm("ExternalLoginConfirmation", "Account", new { ReturnUrl = ViewBag.ReturnUrl })) { 12 | @Html.AntiForgeryToken() 13 | @Html.ValidationSummary(true) 14 | 15 |
16 | Association Form 17 |

18 | You've successfully authenticated with @ViewBag.ProviderDisplayName. 19 | Please enter a user name for this site below and click the Confirm button to finish 20 | logging in. 21 |

22 |
    23 |
  1. 24 | @Html.LabelFor(m => m.UserName) 25 | @Html.TextBoxFor(m => m.UserName) 26 | @Html.ValidationMessageFor(m => m.UserName) 27 |
  2. 28 |
29 | @Html.HiddenFor(m => m.ExternalLoginData) 30 | 31 |
32 | } 33 | 34 | @section Scripts { 35 | @Scripts.Render("~/bundles/jqueryval") 36 | } 37 | -------------------------------------------------------------------------------- /src/Sample/Views/Account/ExternalLoginFailure.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Login Failure"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |

Unsuccessful login with service.

8 |
9 | -------------------------------------------------------------------------------- /src/Sample/Views/Account/Manage.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Models.LocalPasswordModel 2 | @{ 3 | ViewBag.Title = "Manage Account"; 4 | } 5 | 6 |
7 |

@ViewBag.Title.

8 |
9 | 10 |

@ViewBag.StatusMessage

11 | 12 |

You're logged in as @User.Identity.Name.

13 | 14 | @if (ViewBag.HasLocalPassword) 15 | { 16 | @Html.Partial("_ChangePasswordPartial") 17 | } 18 | else 19 | { 20 | @Html.Partial("_SetPasswordPartial") 21 | } 22 | 23 |
24 | @Html.Action("RemoveExternalLogins") 25 | 26 |

Add an external login

27 | @Html.Action("ExternalLoginsList", new { ReturnUrl = ViewBag.ReturnUrl }) 28 |
29 | 30 | @section Scripts { 31 | @Scripts.Render("~/bundles/jqueryval") 32 | } 33 | -------------------------------------------------------------------------------- /src/Sample/Views/Account/Register.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Models.RegisterModel 2 | @{ 3 | ViewBag.Title = "Register"; 4 | } 5 | 6 |
7 |

@ViewBag.Title.

8 |

Create a new account.

9 |
10 | 11 | @using (Html.BeginForm()) { 12 | @Html.AntiForgeryToken() 13 | @Html.ValidationSummary() 14 | 15 |
16 | Registration Form 17 |
    18 |
  1. 19 | @Html.LabelFor(m => m.UserName) 20 | @Html.TextBoxFor(m => m.UserName) 21 |
  2. 22 |
  3. 23 | @Html.LabelFor(m => m.Password) 24 | @Html.PasswordFor(m => m.Password) 25 |
  4. 26 |
  5. 27 | @Html.LabelFor(m => m.ConfirmPassword) 28 | @Html.PasswordFor(m => m.ConfirmPassword) 29 |
  6. 30 |
31 | 32 |
33 | } 34 | 35 | @section Scripts { 36 | @Scripts.Render("~/bundles/jqueryval") 37 | } 38 | -------------------------------------------------------------------------------- /src/Sample/Views/Account/_ChangePasswordPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Models.LocalPasswordModel 2 | 3 |

Change password

4 | 5 | @using (Html.BeginForm("Manage", "Account")) { 6 | @Html.AntiForgeryToken() 7 | @Html.ValidationSummary() 8 | 9 |
10 | Change Password Form 11 |
    12 |
  1. 13 | @Html.LabelFor(m => m.OldPassword) 14 | @Html.PasswordFor(m => m.OldPassword) 15 |
  2. 16 |
  3. 17 | @Html.LabelFor(m => m.NewPassword) 18 | @Html.PasswordFor(m => m.NewPassword) 19 |
  4. 20 |
  5. 21 | @Html.LabelFor(m => m.ConfirmPassword) 22 | @Html.PasswordFor(m => m.ConfirmPassword) 23 |
  6. 24 |
25 | 26 |
27 | } 28 | -------------------------------------------------------------------------------- /src/Sample/Views/Account/_ExternalLoginsListPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model ICollection 2 | 3 | @if (Model.Count == 0) 4 | { 5 |
6 |

There are no external authentication services configured. See this article 7 | for details on setting up this ASP.NET application to support logging in via external services.

8 |
9 | } 10 | else 11 | { 12 | using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = ViewBag.ReturnUrl })) 13 | { 14 | @Html.AntiForgeryToken() 15 |
16 | Log in using another service 17 |

18 | @foreach (AuthenticationClientData p in Model) 19 | { 20 | 21 | } 22 |

23 |
24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Sample/Views/Account/_RemoveExternalLoginsPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model ICollection 2 | 3 | @if (Model.Count > 0) 4 | { 5 |

Registered external logins

6 | 7 | 8 | @foreach (LogMeIn.Models.ExternalLogin externalLogin in Model) 9 | { 10 | 11 | 12 | 30 | 31 | } 32 | 33 |
@externalLogin.ProviderDisplayName 13 | @if (ViewBag.ShowRemoveButton) 14 | { 15 | using (Html.BeginForm("Disassociate", "Account")) 16 | { 17 | @Html.AntiForgeryToken() 18 |
19 | @Html.Hidden("provider", externalLogin.Provider) 20 | @Html.Hidden("providerUserId", externalLogin.ProviderUserId) 21 | 22 |
23 | } 24 | } 25 | else 26 | { 27 | @:   28 | } 29 |
34 | } 35 | -------------------------------------------------------------------------------- /src/Sample/Views/Account/_SetPasswordPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Models.LocalPasswordModel 2 | 3 |

4 | You do not have a local password for this site. Add a local 5 | password so you can log in without an external login. 6 |

7 | 8 | @using (Html.BeginForm("Manage", "Account")) { 9 | @Html.AntiForgeryToken() 10 | @Html.ValidationSummary() 11 | 12 |
13 | Set Password Form 14 |
    15 |
  1. 16 | @Html.LabelFor(m => m.NewPassword) 17 | @Html.PasswordFor(m => m.NewPassword) 18 |
  2. 19 |
  3. 20 | @Html.LabelFor(m => m.ConfirmPassword) 21 | @Html.PasswordFor(m => m.ConfirmPassword) 22 |
  4. 23 |
24 | 25 |
26 | } 27 | -------------------------------------------------------------------------------- /src/Sample/Views/Home/About.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "About"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |

@ViewBag.Message

8 |
9 | 10 |
11 |

12 | Use this area to provide additional information. 13 |

14 | 15 |

16 | Use this area to provide additional information. 17 |

18 | 19 |

20 | Use this area to provide additional information. 21 |

22 |
23 | 24 | -------------------------------------------------------------------------------- /src/Sample/Views/Home/Contact.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Contact"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |

@ViewBag.Message

8 |
9 | 10 |
11 |
12 |

Phone

13 |
14 |

15 | Main: 16 | 425.555.0100 17 |

18 |

19 | After Hours: 20 | 425.555.0199 21 |

22 |
23 | 24 |
25 |
26 |

Email

27 |
28 |

29 | Support: 30 | Support@example.com 31 |

32 |

33 | Marketing: 34 | Marketing@example.com 35 |

36 |

37 | General: 38 | General@example.com 39 |

40 |
41 | 42 |
43 |
44 |

Address

45 |
46 |

47 | One Microsoft Way
48 | Redmond, WA 98052-6399 49 |

50 |
-------------------------------------------------------------------------------- /src/Sample/Views/Home/Create.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Models.Movie 2 | 3 | @{ 4 | ViewBag.Title = "Create"; 5 | } 6 | 7 |

Create

8 | 9 | @using (Html.BeginForm()) { 10 | @Html.ValidationSummary(true) 11 | 12 |
13 | Movie 14 | 15 |
16 | @Html.LabelFor(model => model.Title) 17 |
18 |
19 | @Html.EditorFor(model => model.Title) 20 | @Html.ValidationMessageFor(model => model.Title) 21 |
22 | 23 |
24 | @Html.LabelFor(model => model.Length) 25 |
26 |
27 | @Html.EditorFor(model => model.Length) 28 | @Html.ValidationMessageFor(model => model.Length) 29 |
30 | 31 |

32 | 33 |

34 |
35 | } 36 | 37 |
38 | @Html.ActionLink("Back to List", "Index") 39 |
40 | 41 | @section Scripts { 42 | @Scripts.Render("~/bundles/jqueryval") 43 | } 44 | -------------------------------------------------------------------------------- /src/Sample/Views/Home/Delete.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Models.Movie 2 | 3 | @{ 4 | ViewBag.Title = "Delete"; 5 | } 6 | 7 |

Delete

8 | 9 |

Are you sure you want to delete this?

10 |
11 | Movie 12 | 13 |
14 | @Html.DisplayNameFor(model => model.Title) 15 |
16 |
17 | @Html.DisplayFor(model => model.Title) 18 |
19 | 20 |
21 | @Html.DisplayNameFor(model => model.Length) 22 |
23 |
24 | @Html.DisplayFor(model => model.Length) 25 |
26 |
27 | @using (Html.BeginForm()) { 28 |

29 | | 30 | @Html.ActionLink("Back to List", "Index") 31 |

32 | } 33 | -------------------------------------------------------------------------------- /src/Sample/Views/Home/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Models.Movie 2 | 3 | @{ 4 | ViewBag.Title = "Details"; 5 | } 6 | 7 |

Details

8 | 9 |
10 | Movie 11 | 12 |
13 | @Html.DisplayNameFor(model => model.Title) 14 |
15 |
16 | @Html.DisplayFor(model => model.Title) 17 |
18 | 19 |
20 | @Html.DisplayNameFor(model => model.Length) 21 |
22 |
23 | @Html.DisplayFor(model => model.Length) 24 |
25 |
26 |

27 | @Html.ActionLink("Edit", "Edit", new { id=Model.Id }) | 28 | @Html.ActionLink("Back to List", "Index") 29 |

30 | -------------------------------------------------------------------------------- /src/Sample/Views/Home/Edit.cshtml: -------------------------------------------------------------------------------- 1 | @model LogMeIn.Models.Movie 2 | 3 | @{ 4 | ViewBag.Title = "Edit"; 5 | } 6 | 7 |

Edit

8 | 9 | @using (Html.BeginForm()) { 10 | @Html.ValidationSummary(true) 11 | 12 |
13 | Movie 14 | 15 | @Html.HiddenFor(model => model.Id) 16 | 17 |
18 | @Html.LabelFor(model => model.Title) 19 |
20 |
21 | @Html.EditorFor(model => model.Title) 22 | @Html.ValidationMessageFor(model => model.Title) 23 |
24 | 25 |
26 | @Html.LabelFor(model => model.Length) 27 |
28 |
29 | @Html.EditorFor(model => model.Length) 30 | @Html.ValidationMessageFor(model => model.Length) 31 |
32 | 33 |

34 | 35 |

36 |
37 | } 38 | 39 |
40 | @Html.ActionLink("Back to List", "Index") 41 |
42 | 43 | @section Scripts { 44 | @Scripts.Render("~/bundles/jqueryval") 45 | } 46 | -------------------------------------------------------------------------------- /src/Sample/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model System.Web.Mvc.HandleErrorInfo 2 | 3 | @{ 4 | ViewBag.Title = "Error"; 5 | } 6 | 7 |
8 |

Error.

9 |

An error occurred while processing your request.

10 |
11 | -------------------------------------------------------------------------------- /src/Sample/Views/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @if (Request.IsAuthenticated) { 2 | 3 | Hello, @Html.ActionLink(User.Identity.Name, "Manage", "Account", routeValues: null, htmlAttributes: new { @class = "username", title = "Manage" })! 4 | @using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" })) { 5 | @Html.AntiForgeryToken() 6 | Log off 7 | } 8 | 9 | } else { 10 |
    11 |
  • @Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })
  • 12 |
  • @Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })
  • 13 |
14 | } 15 | -------------------------------------------------------------------------------- /src/Sample/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /src/Sample/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /src/Sample/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OdeToCode/Memflex/aebab0bab6eeb65acaa1605712d7a3cb19727f15/src/Sample/favicon.ico --------------------------------------------------------------------------------