├── .gitattributes ├── .gitignore ├── LoginWithLDAP.sln ├── NuGet.Config ├── README.md ├── global.json └── src └── LoginWithLDAP ├── .bowerrc ├── Controllers └── AppController.cs ├── LoginWithLDAP.xproj ├── Models └── LoginViewModel.cs ├── Project_Readme.html ├── Properties └── launchSettings.json ├── Security ├── MyClaimsPrincipleFactory.cs ├── MyRole.cs ├── MyRoleStore.cs ├── MySignInManager.cs ├── MyUser.cs ├── MyUserManager.cs └── MyUserStore.cs ├── Startup.cs ├── Views ├── App │ ├── Index.cshtml │ └── Login.cshtml ├── Shared │ └── _Layout.cshtml ├── _ViewImports.cshtml └── _ViewStart.cshtml ├── bower.json ├── hosting.ini ├── project.json ├── project.lock.json └── wwwroot ├── lib ├── bootstrap │ ├── .bower.json │ ├── Gruntfile.js │ ├── LICENSE │ ├── README.md │ ├── bower.json │ ├── dist │ │ ├── css │ │ │ ├── bootstrap-theme.css │ │ │ ├── bootstrap-theme.css.map │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ └── bootstrap.min.css │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ └── js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ └── npm.js │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ ├── grunt │ │ ├── .jshintrc │ │ ├── bs-commonjs-generator.js │ │ ├── bs-glyphicons-data-generator.js │ │ ├── bs-lessdoc-parser.js │ │ ├── bs-raw-files-generator.js │ │ ├── configBridge.json │ │ └── sauce_browsers.yml │ ├── js │ │ ├── .jscsrc │ │ ├── .jshintrc │ │ ├── affix.js │ │ ├── alert.js │ │ ├── button.js │ │ ├── carousel.js │ │ ├── collapse.js │ │ ├── dropdown.js │ │ ├── modal.js │ │ ├── popover.js │ │ ├── scrollspy.js │ │ ├── tab.js │ │ ├── tooltip.js │ │ └── transition.js │ ├── less │ │ ├── .csscomb.json │ │ ├── .csslintrc │ │ ├── alerts.less │ │ ├── badges.less │ │ ├── bootstrap.less │ │ ├── breadcrumbs.less │ │ ├── button-groups.less │ │ ├── buttons.less │ │ ├── carousel.less │ │ ├── close.less │ │ ├── code.less │ │ ├── component-animations.less │ │ ├── dropdowns.less │ │ ├── forms.less │ │ ├── glyphicons.less │ │ ├── grid.less │ │ ├── input-groups.less │ │ ├── jumbotron.less │ │ ├── labels.less │ │ ├── list-group.less │ │ ├── media.less │ │ ├── mixins.less │ │ ├── mixins │ │ │ ├── alerts.less │ │ │ ├── background-variant.less │ │ │ ├── border-radius.less │ │ │ ├── buttons.less │ │ │ ├── center-block.less │ │ │ ├── clearfix.less │ │ │ ├── forms.less │ │ │ ├── gradients.less │ │ │ ├── grid-framework.less │ │ │ ├── grid.less │ │ │ ├── hide-text.less │ │ │ ├── image.less │ │ │ ├── labels.less │ │ │ ├── list-group.less │ │ │ ├── nav-divider.less │ │ │ ├── nav-vertical-align.less │ │ │ ├── opacity.less │ │ │ ├── pagination.less │ │ │ ├── panels.less │ │ │ ├── progress-bar.less │ │ │ ├── reset-filter.less │ │ │ ├── reset-text.less │ │ │ ├── resize.less │ │ │ ├── responsive-visibility.less │ │ │ ├── size.less │ │ │ ├── tab-focus.less │ │ │ ├── table-row.less │ │ │ ├── text-emphasis.less │ │ │ ├── text-overflow.less │ │ │ └── vendor-prefixes.less │ │ ├── modals.less │ │ ├── navbar.less │ │ ├── navs.less │ │ ├── normalize.less │ │ ├── pager.less │ │ ├── pagination.less │ │ ├── panels.less │ │ ├── popovers.less │ │ ├── print.less │ │ ├── progress-bars.less │ │ ├── responsive-embed.less │ │ ├── responsive-utilities.less │ │ ├── scaffolding.less │ │ ├── tables.less │ │ ├── theme.less │ │ ├── thumbnails.less │ │ ├── tooltip.less │ │ ├── type.less │ │ ├── utilities.less │ │ ├── variables.less │ │ └── wells.less │ ├── package.js │ └── package.json └── jquery │ ├── .bower.json │ ├── MIT-LICENSE.txt │ ├── bower.json │ ├── dist │ ├── jquery.js │ ├── jquery.min.js │ └── jquery.min.map │ └── src │ ├── ajax.js │ ├── ajax │ ├── jsonp.js │ ├── load.js │ ├── parseJSON.js │ ├── parseXML.js │ ├── script.js │ ├── var │ │ ├── nonce.js │ │ └── rquery.js │ └── xhr.js │ ├── attributes.js │ ├── attributes │ ├── attr.js │ ├── classes.js │ ├── prop.js │ ├── support.js │ └── val.js │ ├── callbacks.js │ ├── core.js │ ├── core │ ├── access.js │ ├── init.js │ ├── parseHTML.js │ ├── ready.js │ └── var │ │ └── rsingleTag.js │ ├── css.js │ ├── css │ ├── addGetHookIf.js │ ├── curCSS.js │ ├── defaultDisplay.js │ ├── hiddenVisibleSelectors.js │ ├── support.js │ ├── swap.js │ └── var │ │ ├── cssExpand.js │ │ ├── getStyles.js │ │ ├── isHidden.js │ │ ├── rmargin.js │ │ └── rnumnonpx.js │ ├── data.js │ ├── data │ ├── Data.js │ ├── accepts.js │ └── var │ │ ├── data_priv.js │ │ └── data_user.js │ ├── deferred.js │ ├── deprecated.js │ ├── dimensions.js │ ├── effects.js │ ├── effects │ ├── Tween.js │ └── animatedSelector.js │ ├── event.js │ ├── event │ ├── ajax.js │ ├── alias.js │ └── support.js │ ├── exports │ ├── amd.js │ └── global.js │ ├── intro.js │ ├── jquery.js │ ├── manipulation.js │ ├── manipulation │ ├── _evalUrl.js │ ├── support.js │ └── var │ │ └── rcheckableType.js │ ├── offset.js │ ├── outro.js │ ├── queue.js │ ├── queue │ └── delay.js │ ├── selector-native.js │ ├── selector-sizzle.js │ ├── selector.js │ ├── serialize.js │ ├── sizzle │ └── dist │ │ ├── sizzle.js │ │ ├── sizzle.min.js │ │ └── sizzle.min.map │ ├── traversing.js │ ├── traversing │ ├── findFilter.js │ └── var │ │ └── rneedsContext.js │ ├── var │ ├── arr.js │ ├── class2type.js │ ├── concat.js │ ├── hasOwn.js │ ├── indexOf.js │ ├── pnum.js │ ├── push.js │ ├── rnotwhite.js │ ├── slice.js │ ├── strundefined.js │ ├── support.js │ └── toString.js │ └── wrap.js └── web.config /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | build/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | 25 | # Visual Studo 2015 cache/options directory 26 | .vs/ 27 | 28 | # MSTest test Results 29 | [Tt]est[Rr]esult*/ 30 | [Bb]uild[Ll]og.* 31 | 32 | # NUNIT 33 | *.VisualState.xml 34 | TestResult.xml 35 | 36 | # Build Results of an ATL Project 37 | [Dd]ebugPS/ 38 | [Rr]eleasePS/ 39 | dlldata.c 40 | 41 | *_i.c 42 | *_p.c 43 | *_i.h 44 | *.ilk 45 | *.meta 46 | *.obj 47 | *.pch 48 | *.pdb 49 | *.pgc 50 | *.pgd 51 | *.rsp 52 | *.sbr 53 | *.tlb 54 | *.tli 55 | *.tlh 56 | *.tmp 57 | *.tmp_proj 58 | *.log 59 | *.vspscc 60 | *.vssscc 61 | .builds 62 | *.pidb 63 | *.svclog 64 | *.scc 65 | 66 | # Chutzpah Test files 67 | _Chutzpah* 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | *.cachefile 76 | 77 | # Visual Studio profiler 78 | *.psess 79 | *.vsp 80 | *.vspx 81 | 82 | # TFS 2012 Local Workspace 83 | $tf/ 84 | 85 | # Guidance Automation Toolkit 86 | *.gpState 87 | 88 | # ReSharper is a .NET coding add-in 89 | _ReSharper*/ 90 | *.[Rr]e[Ss]harper 91 | *.DotSettings.user 92 | 93 | # JustCode is a .NET coding addin-in 94 | .JustCode 95 | 96 | # TeamCity is a build add-in 97 | _TeamCity* 98 | 99 | # DotCover is a Code Coverage Tool 100 | *.dotCover 101 | 102 | # NCrunch 103 | _NCrunch_* 104 | .*crunch*.local.xml 105 | 106 | # MightyMoose 107 | *.mm.* 108 | AutoTest.Net/ 109 | 110 | # Web workbench (sass) 111 | .sass-cache/ 112 | 113 | # Installshield output folder 114 | [Ee]xpress/ 115 | 116 | # DocProject is a documentation generator add-in 117 | DocProject/buildhelp/ 118 | DocProject/Help/*.HxT 119 | DocProject/Help/*.HxC 120 | DocProject/Help/*.hhc 121 | DocProject/Help/*.hhk 122 | DocProject/Help/*.hhp 123 | DocProject/Help/Html2 124 | DocProject/Help/html 125 | 126 | # Click-Once directory 127 | publish/ 128 | 129 | # Publish Web Output 130 | *.[Pp]ublish.xml 131 | *.azurePubxml 132 | # TODO: Comment the next line if you want to checkin your web deploy settings 133 | # but database connection strings (with potential passwords) will be unencrypted 134 | *.pubxml 135 | *.publishproj 136 | 137 | # NuGet Packages 138 | *.nupkg 139 | # The packages folder can be ignored because of Package Restore 140 | **/packages/* 141 | # except build/, which is used as an MSBuild target. 142 | !**/packages/build/ 143 | # Uncomment if necessary however generally it will be regenerated when needed 144 | #!**/packages/repositories.config 145 | 146 | # Windows Azure Build Output 147 | csx/ 148 | *.build.csdef 149 | 150 | # Windows Store app package directory 151 | AppPackages/ 152 | 153 | # Others 154 | *.[Cc]ache 155 | ClientBin/ 156 | [Ss]tyle[Cc]op.* 157 | ~$* 158 | *~ 159 | *.dbmdl 160 | *.dbproj.schemaview 161 | *.pfx 162 | *.publishsettings 163 | node_modules/ 164 | bower_components/ 165 | 166 | # RIA/Silverlight projects 167 | Generated_Code/ 168 | 169 | # Backup & report files from converting an old project file 170 | # to a newer Visual Studio version. Backup files are not needed, 171 | # because we have git ;-) 172 | _UpgradeReport_Files/ 173 | Backup*/ 174 | UpgradeLog*.XML 175 | UpgradeLog*.htm 176 | 177 | # SQL Server files 178 | *.mdf 179 | *.ldf 180 | 181 | # Business Intelligence projects 182 | *.rdl.data 183 | *.bim.layout 184 | *.bim_*.settings 185 | 186 | # Microsoft Fakes 187 | FakesAssemblies/ 188 | 189 | # Node.js Tools for Visual Studio 190 | .ntvs_analysis.dat 191 | 192 | # Visual Studio 6 build log 193 | *.plg 194 | 195 | # Visual Studio 6 workspace options file 196 | *.opt 197 | -------------------------------------------------------------------------------- /LoginWithLDAP.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.23107.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D30F9675-65E0-467F-BEDF-E7D641F1D2D2}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5A90894D-C451-4C7D-8B71-25A9126E6E02}" 9 | ProjectSection(SolutionItems) = preProject 10 | global.json = global.json 11 | NuGet.Config = NuGet.Config 12 | EndProjectSection 13 | EndProject 14 | Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "LoginWithLDAP", "src\LoginWithLDAP\LoginWithLDAP.xproj", "{268BC4C1-BF2E-4959-A12B-30034E027264}" 15 | EndProject 16 | Global 17 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 18 | Debug|Any CPU = Debug|Any CPU 19 | Release|Any CPU = Release|Any CPU 20 | EndGlobalSection 21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 22 | {268BC4C1-BF2E-4959-A12B-30034E027264}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {268BC4C1-BF2E-4959-A12B-30034E027264}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {268BC4C1-BF2E-4959-A12B-30034E027264}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {268BC4C1-BF2E-4959-A12B-30034E027264}.Release|Any CPU.Build.0 = Release|Any CPU 26 | EndGlobalSection 27 | GlobalSection(SolutionProperties) = preSolution 28 | HideSolutionNode = FALSE 29 | EndGlobalSection 30 | GlobalSection(NestedProjects) = preSolution 31 | {268BC4C1-BF2E-4959-A12B-30034E027264} = {D30F9675-65E0-467F-BEDF-E7D641F1D2D2} 32 | EndGlobalSection 33 | EndGlobal 34 | -------------------------------------------------------------------------------- /NuGet.Config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ASPNET5-FormAuthenticationLDAP 2 | Simple project showing a form authentication using LDAP with ASPNET5 / MVC6 / RC1 3 | 4 | The solution will connect to the default domain LDAP. 5 | 6 | Context: 7 | How to use ASPNET5 (RC1), MVC6 and LDAP. 8 | This sounds easy, but I actually struggled putting things together in a simple way. 9 | Let’s say, we just want an application that authenticates and authorizes through LDAP via a simple login/password form. 10 | We’ll have 2 LDAP groups in this example: 11 | - Viewers 12 | - Administrators 13 | 14 | Before running the solution, you will need to modify constants in the class MyUserManager : 15 | - private const string LDAP_VIEWER_GROUP_NAME = "[Your LDAP Group Name]"; 16 | - private const string LDAP_ADMIN_GROUP_NAME = "[Your LDAP Group Name]"; 17 | -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "projects": [ "src", "test" ], 3 | "sdk": { 4 | "architecture": "x64", 5 | "runtime": "clr", 6 | "version": "1.0.0-rc1-final" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "wwwroot/lib" 3 | } 4 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/LoginWithLDAP.xproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 268bc4c1-bf2e-4959-a12b-30034e027264 10 | LoginWithLDAP 11 | ..\..\artifacts\obj\$(MSBuildProjectName) 12 | ..\..\artifacts\bin\$(MSBuildProjectName)\ 13 | 14 | 15 | 2.0 16 | 50612 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/Models/LoginViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace LoginWithLDAP 4 | { 5 | public class LoginViewModel 6 | { 7 | [Required] 8 | [DataType(DataType.Text)] 9 | [Display(Name = "Username")] 10 | public string Username { get; set; } 11 | 12 | [Required] 13 | [DataType(DataType.Password)] 14 | [Display(Name = "Password")] 15 | public string Password { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:21037/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "Hosting:Environment": "Development" 16 | } 17 | }, 18 | "web": { 19 | "commandName": "web", 20 | "environmentVariables": { 21 | "Hosting:Environment": "Development" 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/LoginWithLDAP/Security/MyClaimsPrincipleFactory.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Security.Claims; 3 | using System.Threading.Tasks; 4 | using Microsoft.AspNet.Authentication.Cookies; 5 | using Microsoft.AspNet.Identity; 6 | 7 | namespace LoginWithLDAP 8 | { 9 | /// 10 | /// The Claims factory will generate the user rights. 11 | /// Claims are created and added to the user based on the user roles. 12 | /// 13 | public class MyClaimsPrincipleFactory : IUserClaimsPrincipalFactory 14 | { 15 | public Task CreateAsync(MyUser user) 16 | { 17 | return Task.Factory.StartNew(() => 18 | { 19 | if (user != null && user.Roles != null && user.Roles.Count > 0) 20 | { 21 | // set user details in the claims 22 | var claims = new List { 23 | new Claim(ClaimTypes.NameIdentifier, user.Id), 24 | new Claim(ClaimTypes.Name, user.DisplayName), 25 | new Claim(ClaimTypes.Email, user.Email), 26 | new Claim(ClaimTypes.GivenName, user.FirstName), 27 | new Claim(ClaimTypes.Surname, user.LastName), 28 | }; 29 | 30 | // set user roles in the claims 31 | foreach (var role in user.Roles) 32 | { 33 | claims.Add(new Claim(ClaimTypes.Role, role)); 34 | } 35 | 36 | var identity = new ClaimsIdentity(claims, CookieAuthenticationDefaults.AuthenticationScheme); 37 | var principle = new ClaimsPrincipal(identity); 38 | 39 | return principle; 40 | } 41 | else 42 | return new ClaimsPrincipal(); 43 | }); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /src/LoginWithLDAP/Security/MyRole.cs: -------------------------------------------------------------------------------- 1 | namespace LoginWithLDAP 2 | { 3 | /// 4 | /// This class is not used in this example but is useful for the Identity service to work 5 | /// 6 | public class MyRole 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /src/LoginWithLDAP/Security/MyRoleStore.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading; 3 | using System.Threading.Tasks; 4 | using Microsoft.AspNet.Identity; 5 | 6 | namespace LoginWithLDAP 7 | { 8 | /// 9 | /// The role store is not used in this example but this class is needed for the Identity service to work 10 | /// 11 | /// T of type MyRole 12 | public class MyRoleStore : IRoleStore 13 | { 14 | public Task CreateAsync(MyRole role, CancellationToken cancellationToken) 15 | { 16 | throw new NotImplementedException(); 17 | } 18 | 19 | public Task DeleteAsync(MyRole role, CancellationToken cancellationToken) 20 | { 21 | throw new NotImplementedException(); 22 | } 23 | 24 | public Task FindByIdAsync(string roleId, CancellationToken cancellationToken) 25 | { 26 | throw new NotImplementedException(); 27 | } 28 | 29 | public Task FindByNameAsync(string normalizedRoleName, CancellationToken cancellationToken) 30 | { 31 | throw new NotImplementedException(); 32 | } 33 | 34 | public Task GetNormalizedRoleNameAsync(MyRole role, CancellationToken cancellationToken) 35 | { 36 | throw new NotImplementedException(); 37 | } 38 | 39 | public Task GetRoleIdAsync(MyRole role, CancellationToken cancellationToken) 40 | { 41 | throw new NotImplementedException(); 42 | } 43 | 44 | public Task GetRoleNameAsync(MyRole role, CancellationToken cancellationToken) 45 | { 46 | throw new NotImplementedException(); 47 | } 48 | 49 | public Task SetNormalizedRoleNameAsync(MyRole role, string normalizedName, CancellationToken cancellationToken) 50 | { 51 | throw new NotImplementedException(); 52 | } 53 | 54 | public Task SetRoleNameAsync(MyRole role, string roleName, CancellationToken cancellationToken) 55 | { 56 | throw new NotImplementedException(); 57 | } 58 | 59 | public Task UpdateAsync(MyRole role, CancellationToken cancellationToken) 60 | { 61 | throw new NotImplementedException(); 62 | } 63 | 64 | #region IDisposable Support 65 | private bool disposedValue = false; // To detect redundant calls 66 | 67 | protected virtual void Dispose(bool disposing) 68 | { 69 | if (!disposedValue) 70 | { 71 | if (disposing) 72 | { 73 | // TODO: dispose managed state (managed objects). 74 | } 75 | 76 | // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below. 77 | // TODO: set large fields to null. 78 | 79 | disposedValue = true; 80 | } 81 | } 82 | 83 | // TODO: override a finalizer only if Dispose(bool disposing) above has code to free unmanaged resources. 84 | // ~MyRoleStore() { 85 | // // Do not change this code. Put cleanup code in Dispose(bool disposing) above. 86 | // Dispose(false); 87 | // } 88 | 89 | // This code added to correctly implement the disposable pattern. 90 | public void Dispose() 91 | { 92 | // Do not change this code. Put cleanup code in Dispose(bool disposing) above. 93 | Dispose(true); 94 | // TODO: uncomment the following line if the finalizer is overridden above. 95 | // GC.SuppressFinalize(this); 96 | } 97 | #endregion 98 | } 99 | } -------------------------------------------------------------------------------- /src/LoginWithLDAP/Security/MySignInManager.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Microsoft.AspNet.Authentication.Cookies; 3 | using Microsoft.AspNet.Http; 4 | using Microsoft.AspNet.Identity; 5 | using Microsoft.Extensions.OptionsModel; 6 | 7 | namespace LoginWithLDAP 8 | { 9 | /// 10 | /// The sign in manager manges the sign in and sign out functionality 11 | /// 12 | public class MySignInManager : SignInManager 13 | { 14 | private IHttpContextAccessor _ContextAccessor { get; set; } 15 | public MySignInManager(MyUserManager userManager, 16 | IHttpContextAccessor contextAccessor, 17 | IUserClaimsPrincipalFactory claimsFactory, 18 | IOptions optionsAccessor = null) 19 | : base(userManager, contextAccessor, claimsFactory, optionsAccessor, null) 20 | { 21 | _ContextAccessor = contextAccessor; 22 | } 23 | 24 | public async override Task SignOutAsync() 25 | { 26 | await _ContextAccessor.HttpContext.Authentication.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme); 27 | } 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /src/LoginWithLDAP/Security/MyUser.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace LoginWithLDAP 4 | { 5 | /// 6 | /// Application User 7 | /// 8 | public class MyUser 9 | { 10 | public string Id { get; set; } 11 | public string UserName { get; set; } 12 | public string DisplayName { get; set; } 13 | public string FirstName { get; set; } 14 | public string LastName { get; set; } 15 | public string Password { get; set; } 16 | public string PasswordHash { get; set; } 17 | public string Email { get; set; } 18 | public List Roles { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /src/LoginWithLDAP/Security/MyUserStore.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.DirectoryServices.AccountManagement; 3 | using System.Threading; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNet.Identity; 6 | 7 | namespace LoginWithLDAP 8 | { 9 | /// 10 | /// We define the FindByIdAsync method to get a user populated thanks to LDAP 11 | /// 12 | /// T is MyUser type 13 | public class MyUserStore : IUserStore, IUserPasswordStore 14 | { 15 | // Search and create a user from Active Directory 16 | public async Task FindByIdAsync(string userId, CancellationToken cancellationToken) 17 | { 18 | if (userId == null) 19 | return await Task.Run(() => new MyUser() 20 | { 21 | UserName = "Anonymous", 22 | Id = "Anonymous" 23 | }); 24 | 25 | using (var context = new PrincipalContext(ContextType.Domain)) 26 | { 27 | var directoryUser = UserPrincipal.FindByIdentity(context, userId); 28 | if (directoryUser != null) 29 | { 30 | return await Task.Run(() => new MyUser() 31 | { 32 | Id = userId, 33 | UserName = userId, 34 | Email = directoryUser.EmailAddress, 35 | FirstName = directoryUser.GivenName, 36 | LastName = directoryUser.Surname, 37 | DisplayName = directoryUser.Name 38 | } 39 | ); 40 | } 41 | else 42 | return await Task.Run(() => new MyUser() { 43 | UserName = "Anonymous", 44 | Id = "Anonymous" 45 | }); 46 | } 47 | } 48 | 49 | public void Dispose() 50 | { 51 | 52 | } 53 | 54 | #region Not Implemented 55 | 56 | public Task GetUserIdAsync(MyUser user, CancellationToken cancellationToken) 57 | { 58 | throw new NotImplementedException(); 59 | } 60 | 61 | public Task FindByNameAsync(string normalizedUserName, CancellationToken cancellationToken) 62 | { 63 | throw new NotImplementedException(); 64 | } 65 | 66 | public Task CreateAsync(MyUser user, CancellationToken cancellationToken) 67 | { 68 | throw new NotImplementedException(); 69 | } 70 | 71 | public Task DeleteAsync(MyUser user, CancellationToken cancellationToken) 72 | { 73 | throw new NotImplementedException(); 74 | } 75 | 76 | public Task GetNormalizedUserNameAsync(MyUser user, CancellationToken cancellationToken) 77 | { 78 | throw new NotImplementedException(); 79 | } 80 | 81 | public Task GetPasswordHashAsync(MyUser user, CancellationToken cancellationToken) 82 | { 83 | throw new NotImplementedException(); 84 | } 85 | 86 | public Task GetUserNameAsync(MyUser user, CancellationToken cancellationToken) 87 | { 88 | throw new NotImplementedException(); 89 | } 90 | 91 | public Task HasPasswordAsync(MyUser user, CancellationToken cancellationToken) 92 | { 93 | throw new NotImplementedException(); 94 | } 95 | 96 | public Task SetNormalizedUserNameAsync(MyUser user, string normalizedName, CancellationToken cancellationToken) 97 | { 98 | throw new NotImplementedException(); 99 | } 100 | 101 | public Task SetPasswordHashAsync(MyUser user, string passwordHash, CancellationToken cancellationToken) 102 | { 103 | throw new NotImplementedException(); 104 | } 105 | 106 | public Task SetUserNameAsync(MyUser user, string userName, CancellationToken cancellationToken) 107 | { 108 | throw new NotImplementedException(); 109 | } 110 | 111 | public Task UpdateAsync(MyUser user, CancellationToken cancellationToken) 112 | { 113 | throw new NotImplementedException(); 114 | } 115 | 116 | #endregion 117 | } 118 | 119 | } -------------------------------------------------------------------------------- /src/LoginWithLDAP/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.Builder; 2 | using Microsoft.AspNet.Hosting; 3 | using Microsoft.AspNet.Http; 4 | using Microsoft.Extensions.DependencyInjection; 5 | 6 | namespace LoginWithLDAP 7 | { 8 | public class Startup 9 | { 10 | public Startup(IHostingEnvironment env) 11 | { 12 | 13 | } 14 | 15 | // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=398940 16 | public void ConfigureServices(IServiceCollection services) 17 | { 18 | services.AddMvc(); 19 | services.AddAuthorization(); 20 | services.AddIdentity() 21 | .AddUserStore>() 22 | .AddRoleStore>() 23 | .AddUserManager() 24 | .AddDefaultTokenProviders(); 25 | } 26 | 27 | public void Configure(IApplicationBuilder app) 28 | { 29 | ConfigureAuth(app); 30 | 31 | app.UseMvc(routes => 32 | { 33 | routes.MapRoute( 34 | name: "default", 35 | template: "{controller}/{action}/{id?}", 36 | defaults: new { controller = "App", action = "Login" }); 37 | }); 38 | } 39 | 40 | 41 | private void ConfigureAuth(IApplicationBuilder app) 42 | { 43 | // Use Microsoft.AspNet.Identity & Cookie authentication 44 | app.UseIdentity(); 45 | app.UseCookieAuthentication(options => 46 | { 47 | options.AutomaticAuthenticate = true; 48 | options.LoginPath = new PathString("/App/Login"); 49 | }); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/Views/App/Index.cshtml: -------------------------------------------------------------------------------- 1 | @* 2 | For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860 3 | *@ 4 | @{ 5 | // ViewBag.Title = "Home Page"; 6 | } 7 | 8 |
9 |
10 |

Welcome @ViewBag.GivenName!

11 |

You've successfully logged in :)

12 | 13 |

User details:

14 | Name : @ViewBag.Name
15 | Email : @ViewBag.Email
16 | GivenName : @ViewBag.GivenName
17 | Surname : @ViewBag.Surname
18 |
19 | 20 |

User rights:

21 | Viewer : @ViewBag.Viewer
22 | Administrator : @ViewBag.Administrator

23 | 24 |
26 | 27 | 28 |
29 |
30 |
-------------------------------------------------------------------------------- /src/LoginWithLDAP/Views/App/Login.cshtml: -------------------------------------------------------------------------------- 1 | @* 2 | For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860 3 | *@ 4 | 5 | @model LoginWithLDAP.LoginViewModel 6 | @using System.Collections.Generic 7 | @using Microsoft.AspNet.Http 8 | @using Microsoft.AspNet.Http.Authentication 9 | @inject Microsoft.AspNet.Identity.SignInManager SignInManager 10 | 11 | @{ 12 | Layout = "_Layout"; 13 | ViewBag.Title = "Log in"; 14 | } 15 | 16 |
17 |
18 | 19 |
20 |
21 |

Login!

22 | 23 |
25 | 26 |

Use your active directory account to log in...

27 |
28 | 29 |
30 |
31 | 32 | 33 |
34 |
35 | 36 | 37 |
38 |
39 | 40 |
41 |
42 |
43 |
44 |
45 |
46 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | @ViewBag.Title 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | @RenderBody() 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using LoginWithLDAP 2 | @using Microsoft.Extensions.OptionsModel 3 | @using Microsoft.AspNet.Identity 4 | @addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers" -------------------------------------------------------------------------------- /src/LoginWithLDAP/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | ViewBag.Title = "LDAP Login Example with ASPNET5"; 4 | } 5 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ASP.NET", 3 | "private": true, 4 | "dependencies": { 5 | "bootstrap": "3.3.5" 6 | }, 7 | "exportsOverride": { 8 | "bootstrap": { 9 | "js": "dist/js/*.*", 10 | "css": "dist/css/*.*", 11 | "fonts": "dist/fonts/*.*" 12 | }, 13 | "jquery": { 14 | "js": "jquery.{js,min.js,min.map}" 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/hosting.ini: -------------------------------------------------------------------------------- 1 | server=Microsoft.AspNet.Server.WebListener 2 | server.urls=http://localhost:5000 3 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "webroot": "wwwroot", 3 | "version": "1.0.0-*", 4 | 5 | "dependencies": { 6 | "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final", 7 | "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final", 8 | "Microsoft.AspNet.Server.WebListener": "1.0.0-rc1-final", 9 | "Microsoft.AspNet.Http": "1.0.0-rc1-final", 10 | "Microsoft.AspNet.Authorization": "1.0.0-rc1-final", 11 | "Microsoft.AspNet.Authentication.Cookies": "1.0.0-rc1-final", 12 | "Microsoft.AspNet.Identity": "3.0.0-rc1-final", 13 | "Microsoft.AspNet.Mvc": "6.0.0-rc1-final", 14 | "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-final", 15 | "Microsoft.AspNet.Mvc.Core": "6.0.0-rc1-final", 16 | "Microsoft.AspNet.Mvc.ApiExplorer": "6.0.0-rc1-final", 17 | "Microsoft.AspNet.Mvc.Abstractions": "6.0.0-rc1-final", 18 | "Microsoft.Extensions.CodeGenerators.Mvc": "1.0.0-rc1-final", 19 | "Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-final", 20 | "Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final", 21 | "Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc1-final", 22 | "Microsoft.Extensions.Configuration": "1.0.0-rc1-final", 23 | "Microsoft.Extensions.Logging": "1.0.0-rc1-final", 24 | "Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final", 25 | "Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final" 26 | }, 27 | 28 | "commands": { 29 | "web": "Microsoft.AspNet.Server.Kestrel" 30 | }, 31 | 32 | "frameworks": { 33 | "dnx451": { 34 | "frameworkAssemblies": { 35 | "System.DirectoryServices.AccountManagement": "4.0.0.0" 36 | } 37 | } 38 | }, 39 | 40 | "publishExclude": [ 41 | "node_modules", 42 | "bower_components", 43 | "**.xproj", 44 | "**.user", 45 | "**.vspscc" 46 | ], 47 | "exclude": [ 48 | "wwwroot", 49 | "node_modules", 50 | "bower_components" 51 | ], 52 | 53 | "scripts": { 54 | "postrestore": [ "npm install" ], 55 | "prepare": [ "grunt bower:install" ] 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap", 3 | "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", 4 | "keywords": [ 5 | "css", 6 | "js", 7 | "less", 8 | "mobile-first", 9 | "responsive", 10 | "front-end", 11 | "framework", 12 | "web" 13 | ], 14 | "homepage": "http://getbootstrap.com", 15 | "license": "MIT", 16 | "moduleType": "globals", 17 | "main": [ 18 | "less/bootstrap.less", 19 | "dist/js/bootstrap.js" 20 | ], 21 | "ignore": [ 22 | "/.*", 23 | "_config.yml", 24 | "CNAME", 25 | "composer.json", 26 | "CONTRIBUTING.md", 27 | "docs", 28 | "js/tests", 29 | "test-infra" 30 | ], 31 | "dependencies": { 32 | "jquery": ">= 1.9.1" 33 | }, 34 | "version": "3.3.5", 35 | "_release": "3.3.5", 36 | "_resolution": { 37 | "type": "version", 38 | "tag": "v3.3.5", 39 | "commit": "16b48259a62f576e52c903c476bd42b90ab22482" 40 | }, 41 | "_source": "https://github.com/twbs/bootstrap.git", 42 | "_target": "3.3.5", 43 | "_originalSource": "bootstrap" 44 | } -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2015 Twitter, Inc 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap", 3 | "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", 4 | "keywords": [ 5 | "css", 6 | "js", 7 | "less", 8 | "mobile-first", 9 | "responsive", 10 | "front-end", 11 | "framework", 12 | "web" 13 | ], 14 | "homepage": "http://getbootstrap.com", 15 | "license": "MIT", 16 | "moduleType": "globals", 17 | "main": [ 18 | "less/bootstrap.less", 19 | "dist/js/bootstrap.js" 20 | ], 21 | "ignore": [ 22 | "/.*", 23 | "_config.yml", 24 | "CNAME", 25 | "composer.json", 26 | "CONTRIBUTING.md", 27 | "docs", 28 | "js/tests", 29 | "test-infra" 30 | ], 31 | "dependencies": { 32 | "jquery": ">= 1.9.1" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jesblit/ASPNET5-FormAuthenticationLDAP/b51a8d5b938a8e9964162f74653b7dbe50367625/src/LoginWithLDAP/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jesblit/ASPNET5-FormAuthenticationLDAP/b51a8d5b938a8e9964162f74653b7dbe50367625/src/LoginWithLDAP/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jesblit/ASPNET5-FormAuthenticationLDAP/b51a8d5b938a8e9964162f74653b7dbe50367625/src/LoginWithLDAP/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jesblit/ASPNET5-FormAuthenticationLDAP/b51a8d5b938a8e9964162f74653b7dbe50367625/src/LoginWithLDAP/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/dist/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jesblit/ASPNET5-FormAuthenticationLDAP/b51a8d5b938a8e9964162f74653b7dbe50367625/src/LoginWithLDAP/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jesblit/ASPNET5-FormAuthenticationLDAP/b51a8d5b938a8e9964162f74653b7dbe50367625/src/LoginWithLDAP/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jesblit/ASPNET5-FormAuthenticationLDAP/b51a8d5b938a8e9964162f74653b7dbe50367625/src/LoginWithLDAP/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jesblit/ASPNET5-FormAuthenticationLDAP/b51a8d5b938a8e9964162f74653b7dbe50367625/src/LoginWithLDAP/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/grunt/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends" : "../js/.jshintrc", 3 | "asi" : false, 4 | "browser" : false, 5 | "es3" : false, 6 | "node" : true 7 | } 8 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/grunt/bs-commonjs-generator.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Grunt task for the CommonJS module generation 3 | * http://getbootstrap.com 4 | * Copyright 2014-2015 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | 8 | 'use strict'; 9 | 10 | var fs = require('fs'); 11 | var path = require('path'); 12 | 13 | var COMMONJS_BANNER = '// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.\n'; 14 | 15 | module.exports = function generateCommonJSModule(grunt, srcFiles, destFilepath) { 16 | var destDir = path.dirname(destFilepath); 17 | 18 | function srcPathToDestRequire(srcFilepath) { 19 | var requirePath = path.relative(destDir, srcFilepath).replace(/\\/g, '/'); 20 | return 'require(\'' + requirePath + '\')'; 21 | } 22 | 23 | var moduleOutputJs = COMMONJS_BANNER + srcFiles.map(srcPathToDestRequire).join('\n'); 24 | try { 25 | fs.writeFileSync(destFilepath, moduleOutputJs); 26 | } catch (err) { 27 | grunt.fail.warn(err); 28 | } 29 | grunt.log.writeln('File ' + destFilepath.cyan + ' created.'); 30 | }; 31 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/grunt/bs-glyphicons-data-generator.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Grunt task for Glyphicons data generation 3 | * http://getbootstrap.com 4 | * Copyright 2014-2015 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | 8 | 'use strict'; 9 | 10 | var fs = require('fs'); 11 | 12 | module.exports = function generateGlyphiconsData(grunt) { 13 | // Pass encoding, utf8, so `readFileSync` will return a string instead of a 14 | // buffer 15 | var glyphiconsFile = fs.readFileSync('less/glyphicons.less', 'utf8'); 16 | var glyphiconsLines = glyphiconsFile.split('\n'); 17 | 18 | // Use any line that starts with ".glyphicon-" and capture the class name 19 | var iconClassName = /^\.(glyphicon-[a-zA-Z0-9-]+)/; 20 | var glyphiconsData = '# This file is generated via Grunt task. **Do not edit directly.**\n' + 21 | '# See the \'build-glyphicons-data\' task in Gruntfile.js.\n\n'; 22 | var glyphiconsYml = 'docs/_data/glyphicons.yml'; 23 | for (var i = 0, len = glyphiconsLines.length; i < len; i++) { 24 | var match = glyphiconsLines[i].match(iconClassName); 25 | 26 | if (match !== null) { 27 | glyphiconsData += '- ' + match[1] + '\n'; 28 | } 29 | } 30 | 31 | // Create the `_data` directory if it doesn't already exist 32 | if (!fs.existsSync('docs/_data')) { 33 | fs.mkdirSync('docs/_data'); 34 | } 35 | 36 | try { 37 | fs.writeFileSync(glyphiconsYml, glyphiconsData); 38 | } catch (err) { 39 | grunt.fail.warn(err); 40 | } 41 | grunt.log.writeln('File ' + glyphiconsYml.cyan + ' created.'); 42 | }; 43 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/grunt/bs-raw-files-generator.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Grunt task for generating raw-files.min.js for the Customizer 3 | * http://getbootstrap.com 4 | * Copyright 2014-2015 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | 8 | 'use strict'; 9 | 10 | var fs = require('fs'); 11 | var btoa = require('btoa'); 12 | var glob = require('glob'); 13 | 14 | function getFiles(type) { 15 | var files = {}; 16 | var recursive = type === 'less'; 17 | var globExpr = recursive ? '/**/*' : '/*'; 18 | glob.sync(type + globExpr) 19 | .filter(function (path) { 20 | return type === 'fonts' ? true : new RegExp('\\.' + type + '$').test(path); 21 | }) 22 | .forEach(function (fullPath) { 23 | var relativePath = fullPath.replace(/^[^/]+\//, ''); 24 | files[relativePath] = type === 'fonts' ? btoa(fs.readFileSync(fullPath)) : fs.readFileSync(fullPath, 'utf8'); 25 | }); 26 | return 'var __' + type + ' = ' + JSON.stringify(files) + '\n'; 27 | } 28 | 29 | module.exports = function generateRawFilesJs(grunt, banner) { 30 | if (!banner) { 31 | banner = ''; 32 | } 33 | var dirs = ['js', 'less', 'fonts']; 34 | var files = banner + dirs.map(getFiles).reduce(function (combined, file) { 35 | return combined + file; 36 | }, ''); 37 | var rawFilesJs = 'docs/assets/js/raw-files.min.js'; 38 | try { 39 | fs.writeFileSync(rawFilesJs, files); 40 | } catch (err) { 41 | grunt.fail.warn(err); 42 | } 43 | grunt.log.writeln('File ' + rawFilesJs.cyan + ' created.'); 44 | }; 45 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/grunt/configBridge.json: -------------------------------------------------------------------------------- 1 | { 2 | "paths": { 3 | "customizerJs": [ 4 | "../assets/js/vendor/autoprefixer.js", 5 | "../assets/js/vendor/less.min.js", 6 | "../assets/js/vendor/jszip.min.js", 7 | "../assets/js/vendor/uglify.min.js", 8 | "../assets/js/vendor/Blob.js", 9 | "../assets/js/vendor/FileSaver.js", 10 | "../assets/js/raw-files.min.js", 11 | "../assets/js/src/customizer.js" 12 | ], 13 | "docsJs": [ 14 | "../assets/js/vendor/holder.min.js", 15 | "../assets/js/vendor/ZeroClipboard.min.js", 16 | "../assets/js/vendor/anchor.js", 17 | "../assets/js/src/application.js" 18 | ] 19 | }, 20 | "config": { 21 | "autoprefixerBrowsers": [ 22 | "Android 2.3", 23 | "Android >= 4", 24 | "Chrome >= 20", 25 | "Firefox >= 24", 26 | "Explorer >= 8", 27 | "iOS >= 6", 28 | "Opera >= 12", 29 | "Safari >= 6" 30 | ], 31 | "jqueryCheck": [ 32 | "if (typeof jQuery === 'undefined') {", 33 | " throw new Error('Bootstrap\\'s JavaScript requires jQuery')", 34 | "}\n" 35 | ], 36 | "jqueryVersionCheck": [ 37 | "+function ($) {", 38 | " 'use strict';", 39 | " var version = $.fn.jquery.split(' ')[0].split('.')", 40 | " if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {", 41 | " throw new Error('Bootstrap\\'s JavaScript requires jQuery version 1.9.1 or higher')", 42 | " }", 43 | "}(jQuery);\n\n" 44 | ] 45 | } 46 | } -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/grunt/sauce_browsers.yml: -------------------------------------------------------------------------------- 1 | [ 2 | # Docs: https://saucelabs.com/docs/platforms/webdriver 3 | 4 | { 5 | browserName: "safari", 6 | platform: "OS X 10.10" 7 | }, 8 | { 9 | browserName: "chrome", 10 | platform: "OS X 10.10" 11 | }, 12 | { 13 | browserName: "firefox", 14 | platform: "OS X 10.10" 15 | }, 16 | 17 | # Mac Opera not currently supported by Sauce Labs 18 | 19 | { 20 | browserName: "internet explorer", 21 | version: "11", 22 | platform: "Windows 8.1" 23 | }, 24 | { 25 | browserName: "internet explorer", 26 | version: "10", 27 | platform: "Windows 8" 28 | }, 29 | { 30 | browserName: "internet explorer", 31 | version: "9", 32 | platform: "Windows 7" 33 | }, 34 | { 35 | browserName: "internet explorer", 36 | version: "8", 37 | platform: "Windows 7" 38 | }, 39 | 40 | # { # Unofficial 41 | # browserName: "internet explorer", 42 | # version: "7", 43 | # platform: "Windows XP" 44 | # }, 45 | 46 | { 47 | browserName: "chrome", 48 | platform: "Windows 8.1" 49 | }, 50 | { 51 | browserName: "firefox", 52 | platform: "Windows 8.1" 53 | }, 54 | 55 | # Win Opera 15+ not currently supported by Sauce Labs 56 | 57 | { 58 | browserName: "iphone", 59 | platform: "OS X 10.10", 60 | version: "8.2" 61 | }, 62 | 63 | # iOS Chrome not currently supported by Sauce Labs 64 | 65 | # Linux (unofficial) 66 | { 67 | browserName: "chrome", 68 | platform: "Linux" 69 | }, 70 | { 71 | browserName: "firefox", 72 | platform: "Linux" 73 | } 74 | 75 | # Android Chrome not currently supported by Sauce Labs 76 | 77 | # { # Android Browser (super-unofficial) 78 | # browserName: "android", 79 | # version: "4.0", 80 | # platform: "Linux" 81 | # } 82 | ] 83 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/js/.jscsrc: -------------------------------------------------------------------------------- 1 | { 2 | "disallowEmptyBlocks": true, 3 | "disallowKeywords": ["with"], 4 | "disallowMixedSpacesAndTabs": true, 5 | "disallowMultipleLineStrings": true, 6 | "disallowMultipleVarDecl": true, 7 | "disallowQuotedKeysInObjects": "allButReserved", 8 | "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], 9 | "disallowSpaceBeforeBinaryOperators": [","], 10 | "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], 11 | "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, 12 | "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, 13 | "disallowSpacesInsideArrayBrackets": true, 14 | "disallowSpacesInsideParentheses": true, 15 | "disallowTrailingComma": true, 16 | "disallowTrailingWhitespace": true, 17 | "requireCamelCaseOrUpperCaseIdentifiers": true, 18 | "requireCapitalizedConstructors": true, 19 | "requireCommaBeforeLineBreak": true, 20 | "requireDollarBeforejQueryAssignment": true, 21 | "requireDotNotation": true, 22 | "requireLineFeedAtFileEnd": true, 23 | "requirePaddingNewLinesAfterUseStrict": true, 24 | "requirePaddingNewLinesBeforeExport": true, 25 | "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="], 26 | "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"], 27 | "requireSpaceAfterLineComment": true, 28 | "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="], 29 | "requireSpaceBetweenArguments": true, 30 | "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningCurlyBrace": true, "beforeOpeningRoundBrace": true }, 31 | "requireSpacesInConditionalExpression": true, 32 | "requireSpacesInForStatement": true, 33 | "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, 34 | "requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true }, 35 | "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, 36 | "requireSpacesInsideObjectBrackets": "allButNested", 37 | "validateAlignedFunctionParameters": true, 38 | "validateIndentation": 2, 39 | "validateLineBreaks": "LF", 40 | "validateNewlineAfterArrayElements": true, 41 | "validateQuoteMarks": "'" 42 | } 43 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/js/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "asi" : true, 3 | "browser" : true, 4 | "eqeqeq" : false, 5 | "eqnull" : true, 6 | "es3" : true, 7 | "expr" : true, 8 | "jquery" : true, 9 | "latedef" : true, 10 | "laxbreak" : true, 11 | "nonbsp" : true, 12 | "strict" : true, 13 | "undef" : true, 14 | "unused" : true 15 | } 16 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/js/alert.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: alert.js v3.3.5 3 | * http://getbootstrap.com/javascript/#alerts 4 | * ======================================================================== 5 | * Copyright 2011-2015 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 11 | 'use strict'; 12 | 13 | // ALERT CLASS DEFINITION 14 | // ====================== 15 | 16 | var dismiss = '[data-dismiss="alert"]' 17 | var Alert = function (el) { 18 | $(el).on('click', dismiss, this.close) 19 | } 20 | 21 | Alert.VERSION = '3.3.5' 22 | 23 | Alert.TRANSITION_DURATION = 150 24 | 25 | Alert.prototype.close = function (e) { 26 | var $this = $(this) 27 | var selector = $this.attr('data-target') 28 | 29 | if (!selector) { 30 | selector = $this.attr('href') 31 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 32 | } 33 | 34 | var $parent = $(selector) 35 | 36 | if (e) e.preventDefault() 37 | 38 | if (!$parent.length) { 39 | $parent = $this.closest('.alert') 40 | } 41 | 42 | $parent.trigger(e = $.Event('close.bs.alert')) 43 | 44 | if (e.isDefaultPrevented()) return 45 | 46 | $parent.removeClass('in') 47 | 48 | function removeElement() { 49 | // detach from parent, fire event then clean up data 50 | $parent.detach().trigger('closed.bs.alert').remove() 51 | } 52 | 53 | $.support.transition && $parent.hasClass('fade') ? 54 | $parent 55 | .one('bsTransitionEnd', removeElement) 56 | .emulateTransitionEnd(Alert.TRANSITION_DURATION) : 57 | removeElement() 58 | } 59 | 60 | 61 | // ALERT PLUGIN DEFINITION 62 | // ======================= 63 | 64 | function Plugin(option) { 65 | return this.each(function () { 66 | var $this = $(this) 67 | var data = $this.data('bs.alert') 68 | 69 | if (!data) $this.data('bs.alert', (data = new Alert(this))) 70 | if (typeof option == 'string') data[option].call($this) 71 | }) 72 | } 73 | 74 | var old = $.fn.alert 75 | 76 | $.fn.alert = Plugin 77 | $.fn.alert.Constructor = Alert 78 | 79 | 80 | // ALERT NO CONFLICT 81 | // ================= 82 | 83 | $.fn.alert.noConflict = function () { 84 | $.fn.alert = old 85 | return this 86 | } 87 | 88 | 89 | // ALERT DATA-API 90 | // ============== 91 | 92 | $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) 93 | 94 | }(jQuery); 95 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/js/button.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: button.js v3.3.5 3 | * http://getbootstrap.com/javascript/#buttons 4 | * ======================================================================== 5 | * Copyright 2011-2015 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 11 | 'use strict'; 12 | 13 | // BUTTON PUBLIC CLASS DEFINITION 14 | // ============================== 15 | 16 | var Button = function (element, options) { 17 | this.$element = $(element) 18 | this.options = $.extend({}, Button.DEFAULTS, options) 19 | this.isLoading = false 20 | } 21 | 22 | Button.VERSION = '3.3.5' 23 | 24 | Button.DEFAULTS = { 25 | loadingText: 'loading...' 26 | } 27 | 28 | Button.prototype.setState = function (state) { 29 | var d = 'disabled' 30 | var $el = this.$element 31 | var val = $el.is('input') ? 'val' : 'html' 32 | var data = $el.data() 33 | 34 | state += 'Text' 35 | 36 | if (data.resetText == null) $el.data('resetText', $el[val]()) 37 | 38 | // push to event loop to allow forms to submit 39 | setTimeout($.proxy(function () { 40 | $el[val](data[state] == null ? this.options[state] : data[state]) 41 | 42 | if (state == 'loadingText') { 43 | this.isLoading = true 44 | $el.addClass(d).attr(d, d) 45 | } else if (this.isLoading) { 46 | this.isLoading = false 47 | $el.removeClass(d).removeAttr(d) 48 | } 49 | }, this), 0) 50 | } 51 | 52 | Button.prototype.toggle = function () { 53 | var changed = true 54 | var $parent = this.$element.closest('[data-toggle="buttons"]') 55 | 56 | if ($parent.length) { 57 | var $input = this.$element.find('input') 58 | if ($input.prop('type') == 'radio') { 59 | if ($input.prop('checked')) changed = false 60 | $parent.find('.active').removeClass('active') 61 | this.$element.addClass('active') 62 | } else if ($input.prop('type') == 'checkbox') { 63 | if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false 64 | this.$element.toggleClass('active') 65 | } 66 | $input.prop('checked', this.$element.hasClass('active')) 67 | if (changed) $input.trigger('change') 68 | } else { 69 | this.$element.attr('aria-pressed', !this.$element.hasClass('active')) 70 | this.$element.toggleClass('active') 71 | } 72 | } 73 | 74 | 75 | // BUTTON PLUGIN DEFINITION 76 | // ======================== 77 | 78 | function Plugin(option) { 79 | return this.each(function () { 80 | var $this = $(this) 81 | var data = $this.data('bs.button') 82 | var options = typeof option == 'object' && option 83 | 84 | if (!data) $this.data('bs.button', (data = new Button(this, options))) 85 | 86 | if (option == 'toggle') data.toggle() 87 | else if (option) data.setState(option) 88 | }) 89 | } 90 | 91 | var old = $.fn.button 92 | 93 | $.fn.button = Plugin 94 | $.fn.button.Constructor = Button 95 | 96 | 97 | // BUTTON NO CONFLICT 98 | // ================== 99 | 100 | $.fn.button.noConflict = function () { 101 | $.fn.button = old 102 | return this 103 | } 104 | 105 | 106 | // BUTTON DATA-API 107 | // =============== 108 | 109 | $(document) 110 | .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { 111 | var $btn = $(e.target) 112 | if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') 113 | Plugin.call($btn, 'toggle') 114 | if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault() 115 | }) 116 | .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { 117 | $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) 118 | }) 119 | 120 | }(jQuery); 121 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/js/popover.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: popover.js v3.3.5 3 | * http://getbootstrap.com/javascript/#popovers 4 | * ======================================================================== 5 | * Copyright 2011-2015 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 11 | 'use strict'; 12 | 13 | // POPOVER PUBLIC CLASS DEFINITION 14 | // =============================== 15 | 16 | var Popover = function (element, options) { 17 | this.init('popover', element, options) 18 | } 19 | 20 | if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') 21 | 22 | Popover.VERSION = '3.3.5' 23 | 24 | Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, { 25 | placement: 'right', 26 | trigger: 'click', 27 | content: '', 28 | template: '' 29 | }) 30 | 31 | 32 | // NOTE: POPOVER EXTENDS tooltip.js 33 | // ================================ 34 | 35 | Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype) 36 | 37 | Popover.prototype.constructor = Popover 38 | 39 | Popover.prototype.getDefaults = function () { 40 | return Popover.DEFAULTS 41 | } 42 | 43 | Popover.prototype.setContent = function () { 44 | var $tip = this.tip() 45 | var title = this.getTitle() 46 | var content = this.getContent() 47 | 48 | $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) 49 | $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events 50 | this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text' 51 | ](content) 52 | 53 | $tip.removeClass('fade top bottom left right in') 54 | 55 | // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do 56 | // this manually by checking the contents. 57 | if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide() 58 | } 59 | 60 | Popover.prototype.hasContent = function () { 61 | return this.getTitle() || this.getContent() 62 | } 63 | 64 | Popover.prototype.getContent = function () { 65 | var $e = this.$element 66 | var o = this.options 67 | 68 | return $e.attr('data-content') 69 | || (typeof o.content == 'function' ? 70 | o.content.call($e[0]) : 71 | o.content) 72 | } 73 | 74 | Popover.prototype.arrow = function () { 75 | return (this.$arrow = this.$arrow || this.tip().find('.arrow')) 76 | } 77 | 78 | 79 | // POPOVER PLUGIN DEFINITION 80 | // ========================= 81 | 82 | function Plugin(option) { 83 | return this.each(function () { 84 | var $this = $(this) 85 | var data = $this.data('bs.popover') 86 | var options = typeof option == 'object' && option 87 | 88 | if (!data && /destroy|hide/.test(option)) return 89 | if (!data) $this.data('bs.popover', (data = new Popover(this, options))) 90 | if (typeof option == 'string') data[option]() 91 | }) 92 | } 93 | 94 | var old = $.fn.popover 95 | 96 | $.fn.popover = Plugin 97 | $.fn.popover.Constructor = Popover 98 | 99 | 100 | // POPOVER NO CONFLICT 101 | // =================== 102 | 103 | $.fn.popover.noConflict = function () { 104 | $.fn.popover = old 105 | return this 106 | } 107 | 108 | }(jQuery); 109 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/js/transition.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: transition.js v3.3.5 3 | * http://getbootstrap.com/javascript/#transitions 4 | * ======================================================================== 5 | * Copyright 2011-2015 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 11 | 'use strict'; 12 | 13 | // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) 14 | // ============================================================ 15 | 16 | function transitionEnd() { 17 | var el = document.createElement('bootstrap') 18 | 19 | var transEndEventNames = { 20 | WebkitTransition : 'webkitTransitionEnd', 21 | MozTransition : 'transitionend', 22 | OTransition : 'oTransitionEnd otransitionend', 23 | transition : 'transitionend' 24 | } 25 | 26 | for (var name in transEndEventNames) { 27 | if (el.style[name] !== undefined) { 28 | return { end: transEndEventNames[name] } 29 | } 30 | } 31 | 32 | return false // explicit for ie8 ( ._.) 33 | } 34 | 35 | // http://blog.alexmaccaw.com/css-transitions 36 | $.fn.emulateTransitionEnd = function (duration) { 37 | var called = false 38 | var $el = this 39 | $(this).one('bsTransitionEnd', function () { called = true }) 40 | var callback = function () { if (!called) $($el).trigger($.support.transition.end) } 41 | setTimeout(callback, duration) 42 | return this 43 | } 44 | 45 | $(function () { 46 | $.support.transition = transitionEnd() 47 | 48 | if (!$.support.transition) return 49 | 50 | $.event.special.bsTransitionEnd = { 51 | bindType: $.support.transition.end, 52 | delegateType: $.support.transition.end, 53 | handle: function (e) { 54 | if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) 55 | } 56 | } 57 | }) 58 | 59 | }(jQuery); 60 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/less/.csslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "adjoining-classes": false, 3 | "box-sizing": false, 4 | "box-model": false, 5 | "compatible-vendor-prefixes": false, 6 | "floats": false, 7 | "font-sizes": false, 8 | "gradients": false, 9 | "important": false, 10 | "known-properties": false, 11 | "outline-none": false, 12 | "qualified-headings": false, 13 | "regex-selectors": false, 14 | "shorthand": false, 15 | "text-indent": false, 16 | "unique-headings": false, 17 | "universal-selector": false, 18 | "unqualified-attributes": false 19 | } 20 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/less/alerts.less: -------------------------------------------------------------------------------- 1 | // 2 | // Alerts 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base styles 7 | // ------------------------- 8 | 9 | .alert { 10 | padding: @alert-padding; 11 | margin-bottom: @line-height-computed; 12 | border: 1px solid transparent; 13 | border-radius: @alert-border-radius; 14 | 15 | // Headings for larger alerts 16 | h4 { 17 | margin-top: 0; 18 | // Specified for the h4 to prevent conflicts of changing @headings-color 19 | color: inherit; 20 | } 21 | 22 | // Provide class for links that match alerts 23 | .alert-link { 24 | font-weight: @alert-link-font-weight; 25 | } 26 | 27 | // Improve alignment and spacing of inner content 28 | > p, 29 | > ul { 30 | margin-bottom: 0; 31 | } 32 | 33 | > p + p { 34 | margin-top: 5px; 35 | } 36 | } 37 | 38 | // Dismissible alerts 39 | // 40 | // Expand the right padding and account for the close button's positioning. 41 | 42 | .alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0. 43 | .alert-dismissible { 44 | padding-right: (@alert-padding + 20); 45 | 46 | // Adjust close link position 47 | .close { 48 | position: relative; 49 | top: -2px; 50 | right: -21px; 51 | color: inherit; 52 | } 53 | } 54 | 55 | // Alternate styles 56 | // 57 | // Generate contextual modifier classes for colorizing the alert. 58 | 59 | .alert-success { 60 | .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text); 61 | } 62 | 63 | .alert-info { 64 | .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text); 65 | } 66 | 67 | .alert-warning { 68 | .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text); 69 | } 70 | 71 | .alert-danger { 72 | .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text); 73 | } 74 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/less/badges.less: -------------------------------------------------------------------------------- 1 | // 2 | // Badges 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .badge { 8 | display: inline-block; 9 | min-width: 10px; 10 | padding: 3px 7px; 11 | font-size: @font-size-small; 12 | font-weight: @badge-font-weight; 13 | color: @badge-color; 14 | line-height: @badge-line-height; 15 | vertical-align: middle; 16 | white-space: nowrap; 17 | text-align: center; 18 | background-color: @badge-bg; 19 | border-radius: @badge-border-radius; 20 | 21 | // Empty badges collapse automatically (not available in IE8) 22 | &:empty { 23 | display: none; 24 | } 25 | 26 | // Quick fix for badges in buttons 27 | .btn & { 28 | position: relative; 29 | top: -1px; 30 | } 31 | 32 | .btn-xs &, 33 | .btn-group-xs > .btn & { 34 | top: 0; 35 | padding: 1px 5px; 36 | } 37 | 38 | // Hover state, but only for links 39 | a& { 40 | &:hover, 41 | &:focus { 42 | color: @badge-link-hover-color; 43 | text-decoration: none; 44 | cursor: pointer; 45 | } 46 | } 47 | 48 | // Account for badges in navs 49 | .list-group-item.active > &, 50 | .nav-pills > .active > a > & { 51 | color: @badge-active-color; 52 | background-color: @badge-active-bg; 53 | } 54 | 55 | .list-group-item > & { 56 | float: right; 57 | } 58 | 59 | .list-group-item > & + & { 60 | margin-right: 5px; 61 | } 62 | 63 | .nav-pills > li > a > & { 64 | margin-left: 3px; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/less/bootstrap.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.5 (http://getbootstrap.com) 3 | * Copyright 2011-2015 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | 7 | // Core variables and mixins 8 | @import "variables.less"; 9 | @import "mixins.less"; 10 | 11 | // Reset and dependencies 12 | @import "normalize.less"; 13 | @import "print.less"; 14 | @import "glyphicons.less"; 15 | 16 | // Core CSS 17 | @import "scaffolding.less"; 18 | @import "type.less"; 19 | @import "code.less"; 20 | @import "grid.less"; 21 | @import "tables.less"; 22 | @import "forms.less"; 23 | @import "buttons.less"; 24 | 25 | // Components 26 | @import "component-animations.less"; 27 | @import "dropdowns.less"; 28 | @import "button-groups.less"; 29 | @import "input-groups.less"; 30 | @import "navs.less"; 31 | @import "navbar.less"; 32 | @import "breadcrumbs.less"; 33 | @import "pagination.less"; 34 | @import "pager.less"; 35 | @import "labels.less"; 36 | @import "badges.less"; 37 | @import "jumbotron.less"; 38 | @import "thumbnails.less"; 39 | @import "alerts.less"; 40 | @import "progress-bars.less"; 41 | @import "media.less"; 42 | @import "list-group.less"; 43 | @import "panels.less"; 44 | @import "responsive-embed.less"; 45 | @import "wells.less"; 46 | @import "close.less"; 47 | 48 | // Components w/ JavaScript 49 | @import "modals.less"; 50 | @import "tooltip.less"; 51 | @import "popovers.less"; 52 | @import "carousel.less"; 53 | 54 | // Utility classes 55 | @import "utilities.less"; 56 | @import "responsive-utilities.less"; 57 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/less/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal; 8 | margin-bottom: @line-height-computed; 9 | list-style: none; 10 | background-color: @breadcrumb-bg; 11 | border-radius: @border-radius-base; 12 | 13 | > li { 14 | display: inline-block; 15 | 16 | + li:before { 17 | content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space 18 | padding: 0 5px; 19 | color: @breadcrumb-color; 20 | } 21 | } 22 | 23 | > .active { 24 | color: @breadcrumb-active-color; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/less/close.less: -------------------------------------------------------------------------------- 1 | // 2 | // Close icons 3 | // -------------------------------------------------- 4 | 5 | 6 | .close { 7 | float: right; 8 | font-size: (@font-size-base * 1.5); 9 | font-weight: @close-font-weight; 10 | line-height: 1; 11 | color: @close-color; 12 | text-shadow: @close-text-shadow; 13 | .opacity(.2); 14 | 15 | &:hover, 16 | &:focus { 17 | color: @close-color; 18 | text-decoration: none; 19 | cursor: pointer; 20 | .opacity(.5); 21 | } 22 | 23 | // Additional properties for button version 24 | // iOS requires the button element instead of an anchor tag. 25 | // If you want the anchor version, it requires `href="#"`. 26 | // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile 27 | button& { 28 | padding: 0; 29 | cursor: pointer; 30 | background: transparent; 31 | border: 0; 32 | -webkit-appearance: none; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/less/code.less: -------------------------------------------------------------------------------- 1 | // 2 | // Code (inline and block) 3 | // -------------------------------------------------- 4 | 5 | 6 | // Inline and block code styles 7 | code, 8 | kbd, 9 | pre, 10 | samp { 11 | font-family: @font-family-monospace; 12 | } 13 | 14 | // Inline code 15 | code { 16 | padding: 2px 4px; 17 | font-size: 90%; 18 | color: @code-color; 19 | background-color: @code-bg; 20 | border-radius: @border-radius-base; 21 | } 22 | 23 | // User input typically entered via keyboard 24 | kbd { 25 | padding: 2px 4px; 26 | font-size: 90%; 27 | color: @kbd-color; 28 | background-color: @kbd-bg; 29 | border-radius: @border-radius-small; 30 | box-shadow: inset 0 -1px 0 rgba(0,0,0,.25); 31 | 32 | kbd { 33 | padding: 0; 34 | font-size: 100%; 35 | font-weight: bold; 36 | box-shadow: none; 37 | } 38 | } 39 | 40 | // Blocks of code 41 | pre { 42 | display: block; 43 | padding: ((@line-height-computed - 1) / 2); 44 | margin: 0 0 (@line-height-computed / 2); 45 | font-size: (@font-size-base - 1); // 14px to 13px 46 | line-height: @line-height-base; 47 | word-break: break-all; 48 | word-wrap: break-word; 49 | color: @pre-color; 50 | background-color: @pre-bg; 51 | border: 1px solid @pre-border-color; 52 | border-radius: @border-radius-base; 53 | 54 | // Account for some code outputs that place code tags in pre tags 55 | code { 56 | padding: 0; 57 | font-size: inherit; 58 | color: inherit; 59 | white-space: pre-wrap; 60 | background-color: transparent; 61 | border-radius: 0; 62 | } 63 | } 64 | 65 | // Enable scrollable blocks of code 66 | .pre-scrollable { 67 | max-height: @pre-scrollable-max-height; 68 | overflow-y: scroll; 69 | } 70 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/less/component-animations.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component animations 3 | // -------------------------------------------------- 4 | 5 | // Heads up! 6 | // 7 | // We don't use the `.opacity()` mixin here since it causes a bug with text 8 | // fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552. 9 | 10 | .fade { 11 | opacity: 0; 12 | .transition(opacity .15s linear); 13 | &.in { 14 | opacity: 1; 15 | } 16 | } 17 | 18 | .collapse { 19 | display: none; 20 | 21 | &.in { display: block; } 22 | tr&.in { display: table-row; } 23 | tbody&.in { display: table-row-group; } 24 | } 25 | 26 | .collapsing { 27 | position: relative; 28 | height: 0; 29 | overflow: hidden; 30 | .transition-property(~"height, visibility"); 31 | .transition-duration(.35s); 32 | .transition-timing-function(ease); 33 | } 34 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/less/grid.less: -------------------------------------------------------------------------------- 1 | // 2 | // Grid system 3 | // -------------------------------------------------- 4 | 5 | 6 | // Container widths 7 | // 8 | // Set the container width, and override it for fixed navbars in media queries. 9 | 10 | .container { 11 | .container-fixed(); 12 | 13 | @media (min-width: @screen-sm-min) { 14 | width: @container-sm; 15 | } 16 | @media (min-width: @screen-md-min) { 17 | width: @container-md; 18 | } 19 | @media (min-width: @screen-lg-min) { 20 | width: @container-lg; 21 | } 22 | } 23 | 24 | 25 | // Fluid container 26 | // 27 | // Utilizes the mixin meant for fixed width containers, but without any defined 28 | // width for fluid, full width layouts. 29 | 30 | .container-fluid { 31 | .container-fixed(); 32 | } 33 | 34 | 35 | // Row 36 | // 37 | // Rows contain and clear the floats of your columns. 38 | 39 | .row { 40 | .make-row(); 41 | } 42 | 43 | 44 | // Columns 45 | // 46 | // Common styles for small and large grid columns 47 | 48 | .make-grid-columns(); 49 | 50 | 51 | // Extra small grid 52 | // 53 | // Columns, offsets, pushes, and pulls for extra small devices like 54 | // smartphones. 55 | 56 | .make-grid(xs); 57 | 58 | 59 | // Small grid 60 | // 61 | // Columns, offsets, pushes, and pulls for the small device range, from phones 62 | // to tablets. 63 | 64 | @media (min-width: @screen-sm-min) { 65 | .make-grid(sm); 66 | } 67 | 68 | 69 | // Medium grid 70 | // 71 | // Columns, offsets, pushes, and pulls for the desktop device range. 72 | 73 | @media (min-width: @screen-md-min) { 74 | .make-grid(md); 75 | } 76 | 77 | 78 | // Large grid 79 | // 80 | // Columns, offsets, pushes, and pulls for the large desktop device range. 81 | 82 | @media (min-width: @screen-lg-min) { 83 | .make-grid(lg); 84 | } 85 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/less/jumbotron.less: -------------------------------------------------------------------------------- 1 | // 2 | // Jumbotron 3 | // -------------------------------------------------- 4 | 5 | 6 | .jumbotron { 7 | padding-top: @jumbotron-padding; 8 | padding-bottom: @jumbotron-padding; 9 | margin-bottom: @jumbotron-padding; 10 | color: @jumbotron-color; 11 | background-color: @jumbotron-bg; 12 | 13 | h1, 14 | .h1 { 15 | color: @jumbotron-heading-color; 16 | } 17 | 18 | p { 19 | margin-bottom: (@jumbotron-padding / 2); 20 | font-size: @jumbotron-font-size; 21 | font-weight: 200; 22 | } 23 | 24 | > hr { 25 | border-top-color: darken(@jumbotron-bg, 10%); 26 | } 27 | 28 | .container &, 29 | .container-fluid & { 30 | border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container 31 | } 32 | 33 | .container { 34 | max-width: 100%; 35 | } 36 | 37 | @media screen and (min-width: @screen-sm-min) { 38 | padding-top: (@jumbotron-padding * 1.6); 39 | padding-bottom: (@jumbotron-padding * 1.6); 40 | 41 | .container &, 42 | .container-fluid & { 43 | padding-left: (@jumbotron-padding * 2); 44 | padding-right: (@jumbotron-padding * 2); 45 | } 46 | 47 | h1, 48 | .h1 { 49 | font-size: @jumbotron-heading-font-size; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/less/labels.less: -------------------------------------------------------------------------------- 1 | // 2 | // Labels 3 | // -------------------------------------------------- 4 | 5 | .label { 6 | display: inline; 7 | padding: .2em .6em .3em; 8 | font-size: 75%; 9 | font-weight: bold; 10 | line-height: 1; 11 | color: @label-color; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | border-radius: .25em; 16 | 17 | // Add hover effects, but only for links 18 | a& { 19 | &:hover, 20 | &:focus { 21 | color: @label-link-hover-color; 22 | text-decoration: none; 23 | cursor: pointer; 24 | } 25 | } 26 | 27 | // Empty labels collapse automatically (not available in IE8) 28 | &:empty { 29 | display: none; 30 | } 31 | 32 | // Quick fix for labels in buttons 33 | .btn & { 34 | position: relative; 35 | top: -1px; 36 | } 37 | } 38 | 39 | // Colors 40 | // Contextual variations (linked labels get darker on :hover) 41 | 42 | .label-default { 43 | .label-variant(@label-default-bg); 44 | } 45 | 46 | .label-primary { 47 | .label-variant(@label-primary-bg); 48 | } 49 | 50 | .label-success { 51 | .label-variant(@label-success-bg); 52 | } 53 | 54 | .label-info { 55 | .label-variant(@label-info-bg); 56 | } 57 | 58 | .label-warning { 59 | .label-variant(@label-warning-bg); 60 | } 61 | 62 | .label-danger { 63 | .label-variant(@label-danger-bg); 64 | } 65 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/less/list-group.less: -------------------------------------------------------------------------------- 1 | // 2 | // List groups 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | // 8 | // Easily usable on
    ,
      , or
      . 9 | 10 | .list-group { 11 | // No need to set list-style: none; since .list-group-item is block level 12 | margin-bottom: 20px; 13 | padding-left: 0; // reset padding because ul and ol 14 | } 15 | 16 | 17 | // Individual list items 18 | // 19 | // Use on `li`s or `div`s within the `.list-group` parent. 20 | 21 | .list-group-item { 22 | position: relative; 23 | display: block; 24 | padding: 10px 15px; 25 | // Place the border on the list items and negative margin up for better styling 26 | margin-bottom: -1px; 27 | background-color: @list-group-bg; 28 | border: 1px solid @list-group-border; 29 | 30 | // Round the first and last items 31 | &:first-child { 32 | .border-top-radius(@list-group-border-radius); 33 | } 34 | &:last-child { 35 | margin-bottom: 0; 36 | .border-bottom-radius(@list-group-border-radius); 37 | } 38 | } 39 | 40 | 41 | // Interactive list items 42 | // 43 | // Use anchor or button elements instead of `li`s or `div`s to create interactive items. 44 | // Includes an extra `.active` modifier class for showing selected items. 45 | 46 | a.list-group-item, 47 | button.list-group-item { 48 | color: @list-group-link-color; 49 | 50 | .list-group-item-heading { 51 | color: @list-group-link-heading-color; 52 | } 53 | 54 | // Hover state 55 | &:hover, 56 | &:focus { 57 | text-decoration: none; 58 | color: @list-group-link-hover-color; 59 | background-color: @list-group-hover-bg; 60 | } 61 | } 62 | 63 | button.list-group-item { 64 | width: 100%; 65 | text-align: left; 66 | } 67 | 68 | .list-group-item { 69 | // Disabled state 70 | &.disabled, 71 | &.disabled:hover, 72 | &.disabled:focus { 73 | background-color: @list-group-disabled-bg; 74 | color: @list-group-disabled-color; 75 | cursor: @cursor-disabled; 76 | 77 | // Force color to inherit for custom content 78 | .list-group-item-heading { 79 | color: inherit; 80 | } 81 | .list-group-item-text { 82 | color: @list-group-disabled-text-color; 83 | } 84 | } 85 | 86 | // Active class on item itself, not parent 87 | &.active, 88 | &.active:hover, 89 | &.active:focus { 90 | z-index: 2; // Place active items above their siblings for proper border styling 91 | color: @list-group-active-color; 92 | background-color: @list-group-active-bg; 93 | border-color: @list-group-active-border; 94 | 95 | // Force color to inherit for custom content 96 | .list-group-item-heading, 97 | .list-group-item-heading > small, 98 | .list-group-item-heading > .small { 99 | color: inherit; 100 | } 101 | .list-group-item-text { 102 | color: @list-group-active-text-color; 103 | } 104 | } 105 | } 106 | 107 | 108 | // Contextual variants 109 | // 110 | // Add modifier classes to change text and background color on individual items. 111 | // Organizationally, this must come after the `:hover` states. 112 | 113 | .list-group-item-variant(success; @state-success-bg; @state-success-text); 114 | .list-group-item-variant(info; @state-info-bg; @state-info-text); 115 | .list-group-item-variant(warning; @state-warning-bg; @state-warning-text); 116 | .list-group-item-variant(danger; @state-danger-bg; @state-danger-text); 117 | 118 | 119 | // Custom content options 120 | // 121 | // Extra classes for creating well-formatted content within `.list-group-item`s. 122 | 123 | .list-group-item-heading { 124 | margin-top: 0; 125 | margin-bottom: 5px; 126 | } 127 | .list-group-item-text { 128 | margin-bottom: 0; 129 | line-height: 1.3; 130 | } 131 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/less/media.less: -------------------------------------------------------------------------------- 1 | .media { 2 | // Proper spacing between instances of .media 3 | margin-top: 15px; 4 | 5 | &:first-child { 6 | margin-top: 0; 7 | } 8 | } 9 | 10 | .media, 11 | .media-body { 12 | zoom: 1; 13 | overflow: hidden; 14 | } 15 | 16 | .media-body { 17 | width: 10000px; 18 | } 19 | 20 | .media-object { 21 | display: block; 22 | 23 | // Fix collapse in webkit from max-width: 100% and display: table-cell. 24 | &.img-thumbnail { 25 | max-width: none; 26 | } 27 | } 28 | 29 | .media-right, 30 | .media > .pull-right { 31 | padding-left: 10px; 32 | } 33 | 34 | .media-left, 35 | .media > .pull-left { 36 | padding-right: 10px; 37 | } 38 | 39 | .media-left, 40 | .media-right, 41 | .media-body { 42 | display: table-cell; 43 | vertical-align: top; 44 | } 45 | 46 | .media-middle { 47 | vertical-align: middle; 48 | } 49 | 50 | .media-bottom { 51 | vertical-align: bottom; 52 | } 53 | 54 | // Reset margins on headings for tighter default spacing 55 | .media-heading { 56 | margin-top: 0; 57 | margin-bottom: 5px; 58 | } 59 | 60 | // Media list variation 61 | // 62 | // Undo default ul/ol styles 63 | .media-list { 64 | padding-left: 0; 65 | list-style: none; 66 | } 67 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------------------------------- 3 | 4 | // Utilities 5 | @import "mixins/hide-text.less"; 6 | @import "mixins/opacity.less"; 7 | @import "mixins/image.less"; 8 | @import "mixins/labels.less"; 9 | @import "mixins/reset-filter.less"; 10 | @import "mixins/resize.less"; 11 | @import "mixins/responsive-visibility.less"; 12 | @import "mixins/size.less"; 13 | @import "mixins/tab-focus.less"; 14 | @import "mixins/reset-text.less"; 15 | @import "mixins/text-emphasis.less"; 16 | @import "mixins/text-overflow.less"; 17 | @import "mixins/vendor-prefixes.less"; 18 | 19 | // Components 20 | @import "mixins/alerts.less"; 21 | @import "mixins/buttons.less"; 22 | @import "mixins/panels.less"; 23 | @import "mixins/pagination.less"; 24 | @import "mixins/list-group.less"; 25 | @import "mixins/nav-divider.less"; 26 | @import "mixins/forms.less"; 27 | @import "mixins/progress-bar.less"; 28 | @import "mixins/table-row.less"; 29 | 30 | // Skins 31 | @import "mixins/background-variant.less"; 32 | @import "mixins/border-radius.less"; 33 | @import "mixins/gradients.less"; 34 | 35 | // Layout 36 | @import "mixins/clearfix.less"; 37 | @import "mixins/center-block.less"; 38 | @import "mixins/nav-vertical-align.less"; 39 | @import "mixins/grid-framework.less"; 40 | @import "mixins/grid.less"; 41 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/less/mixins/alerts.less: -------------------------------------------------------------------------------- 1 | // Alerts 2 | 3 | .alert-variant(@background; @border; @text-color) { 4 | background-color: @background; 5 | border-color: @border; 6 | color: @text-color; 7 | 8 | hr { 9 | border-top-color: darken(@border, 5%); 10 | } 11 | .alert-link { 12 | color: darken(@text-color, 10%); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/less/mixins/background-variant.less: -------------------------------------------------------------------------------- 1 | // Contextual backgrounds 2 | 3 | .bg-variant(@color) { 4 | background-color: @color; 5 | a&:hover, 6 | a&:focus { 7 | background-color: darken(@color, 10%); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/less/mixins/border-radius.less: -------------------------------------------------------------------------------- 1 | // Single side border-radius 2 | 3 | .border-top-radius(@radius) { 4 | border-top-right-radius: @radius; 5 | border-top-left-radius: @radius; 6 | } 7 | .border-right-radius(@radius) { 8 | border-bottom-right-radius: @radius; 9 | border-top-right-radius: @radius; 10 | } 11 | .border-bottom-radius(@radius) { 12 | border-bottom-right-radius: @radius; 13 | border-bottom-left-radius: @radius; 14 | } 15 | .border-left-radius(@radius) { 16 | border-bottom-left-radius: @radius; 17 | border-top-left-radius: @radius; 18 | } 19 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/less/mixins/buttons.less: -------------------------------------------------------------------------------- 1 | // Button variants 2 | // 3 | // Easily pump out default styles, as well as :hover, :focus, :active, 4 | // and disabled options for all buttons 5 | 6 | .button-variant(@color; @background; @border) { 7 | color: @color; 8 | background-color: @background; 9 | border-color: @border; 10 | 11 | &:focus, 12 | &.focus { 13 | color: @color; 14 | background-color: darken(@background, 10%); 15 | border-color: darken(@border, 25%); 16 | } 17 | &:hover { 18 | color: @color; 19 | background-color: darken(@background, 10%); 20 | border-color: darken(@border, 12%); 21 | } 22 | &:active, 23 | &.active, 24 | .open > .dropdown-toggle& { 25 | color: @color; 26 | background-color: darken(@background, 10%); 27 | border-color: darken(@border, 12%); 28 | 29 | &:hover, 30 | &:focus, 31 | &.focus { 32 | color: @color; 33 | background-color: darken(@background, 17%); 34 | border-color: darken(@border, 25%); 35 | } 36 | } 37 | &:active, 38 | &.active, 39 | .open > .dropdown-toggle& { 40 | background-image: none; 41 | } 42 | &.disabled, 43 | &[disabled], 44 | fieldset[disabled] & { 45 | &, 46 | &:hover, 47 | &:focus, 48 | &.focus, 49 | &:active, 50 | &.active { 51 | background-color: @background; 52 | border-color: @border; 53 | } 54 | } 55 | 56 | .badge { 57 | color: @background; 58 | background-color: @color; 59 | } 60 | } 61 | 62 | // Button sizes 63 | .button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) { 64 | padding: @padding-vertical @padding-horizontal; 65 | font-size: @font-size; 66 | line-height: @line-height; 67 | border-radius: @border-radius; 68 | } 69 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/less/mixins/center-block.less: -------------------------------------------------------------------------------- 1 | // Center-align a block level element 2 | 3 | .center-block() { 4 | display: block; 5 | margin-left: auto; 6 | margin-right: auto; 7 | } 8 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/less/mixins/clearfix.less: -------------------------------------------------------------------------------- 1 | // Clearfix 2 | // 3 | // For modern browsers 4 | // 1. The space content is one way to avoid an Opera bug when the 5 | // contenteditable attribute is included anywhere else in the document. 6 | // Otherwise it causes space to appear at the top and bottom of elements 7 | // that are clearfixed. 8 | // 2. The use of `table` rather than `block` is only necessary if using 9 | // `:before` to contain the top-margins of child elements. 10 | // 11 | // Source: http://nicolasgallagher.com/micro-clearfix-hack/ 12 | 13 | .clearfix() { 14 | &:before, 15 | &:after { 16 | content: " "; // 1 17 | display: table; // 2 18 | } 19 | &:after { 20 | clear: both; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/LoginWithLDAP/wwwroot/lib/bootstrap/less/mixins/forms.less: -------------------------------------------------------------------------------- 1 | // Form validation states 2 | // 3 | // Used in forms.less to generate the form validation CSS for warnings, errors, 4 | // and successes. 5 | 6 | .form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) { 7 | // Color the label and help text 8 | .help-block, 9 | .control-label, 10 | .radio, 11 | .checkbox, 12 | .radio-inline, 13 | .checkbox-inline, 14 | &.radio label, 15 | &.checkbox label, 16 | &.radio-inline label, 17 | &.checkbox-inline label { 18 | color: @text-color; 19 | } 20 | // Set the border and box shadow on specific inputs to match 21 | .form-control { 22 | border-color: @border-color; 23 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work 24 | &:focus { 25 | border-color: darken(@border-color, 10%); 26 | @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%); 27 | .box-shadow(@shadow); 28 | } 29 | } 30 | // Set validation states also for addons 31 | .input-group-addon { 32 | color: @text-color; 33 | border-color: @border-color; 34 | background-color: @background-color; 35 | } 36 | // Optional feedback icon 37 | .form-control-feedback { 38 | color: @text-color; 39 | } 40 | } 41 | 42 | 43 | // Form control focus state 44 | // 45 | // Generate a customized focus state and for any input with the specified color, 46 | // which defaults to the `@input-border-focus` variable. 47 | // 48 | // We highly encourage you to not customize the default value, but instead use 49 | // this to tweak colors on an as-needed basis. This aesthetic change is based on 50 | // WebKit's default styles, but applicable to a wider range of browsers. Its 51 | // usability and accessibility should be taken into account with any change. 52 | // 53 | // Example usage: change the default blue border and shadow to white for better 54 | // contrast against a dark gray background. 55 | .form-control-focus(@color: @input-border-focus) { 56 | @color-rgba: rgba(red(@color), green(@color), blue(@color), .6); 57 | &:focus { 58 | border-color: @color; 59 | outline: 0; 60 | .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}"); 61 | } 62 | } 63 | 64 | // Form control sizing 65 | // 66 | // Relative text size, padding, and border-radii changes for form controls. For 67 | // horizontal sizing, wrap controls in the predefined grid classes. `