Skip to content

Commit

Permalink
Merge pull request #32 from crobibero/master
Browse files Browse the repository at this point in the history
Enable EasyPin login
  • Loading branch information
Bond-009 authored Apr 25, 2020
2 parents 4241514 + 0609564 commit 7ea822e
Show file tree
Hide file tree
Showing 6 changed files with 290 additions and 195 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
/LDAP-Auth.sln.DotSettings.user
/bin/Debug/netstandard2.0
/.vs/LDAP-Auth/v15
.idea
2 changes: 2 additions & 0 deletions LDAP-Auth/Config/PluginConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class PluginConfiguration : MediaBrowser.Model.Plugins.BasePluginConfigu
public string LdapBindPassword { get; set; }
public bool CreateUsersFromLdap { get; set; }
public bool UseSsl { get; set; }
public string EasyPasswordField { get; set; }
public bool UseStartTls { get; set; }
public bool SkipSslVerify { get; set; }

Expand All @@ -27,6 +28,7 @@ public PluginConfiguration()
LdapAdminFilter = "(enabledService=JellyfinAdministrator)";
LdapBindUser = "CN=BindUser,DC=contoso,DC=com";
LdapBindPassword = "password";
EasyPasswordField = string.Empty;
CreateUsersFromLdap = true;
UseSsl = true;
UseStartTls = false;
Expand Down
6 changes: 6 additions & 0 deletions LDAP-Auth/Config/configPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ <h2 class="sectionTitle">LDAP Settings:</h2>
<input is="emby-input" type="password" id="txtLdapBindPassword" label="LDAP Bind User Password:" />
<div class="fieldDescription">The password for the LDAP search query user.</div>
</div>
<div class="inputContainer fldExternalAddressFilter">
<input is="emby-input" type="text" id="txtLdapEasyPasswordAttr" label="LDAP Easy Password Attribute:" />
<div class="fieldDescription">The attribute to store the Easy Password in.</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input type="checkbox" is="emby-checkbox" id="chkEnableUserCreation" />
Expand Down Expand Up @@ -121,6 +125,7 @@ <h2 class="sectionTitle">LDAP Settings:</h2>
$('#txtLdapAdminFilter', page).val(config.LdapAdminFilter || "(enabledService=JellyfinAdministrator");
$('#txtLdapBindUser', page).val(config.LdapBindUser || "CN=BindUser,DC=contoso,DC=com");
$('#txtLdapBindPassword', page).val(config.LdapBindPassword || "");
$('#txtLdapEasyPasswordAttr', page).val(config.EasyPasswordField || "");
$("#chkEnableUserCreation", page).checked(config.CreateUsersFromLdap);
Dashboard.hideLoadingMsg();
});
Expand All @@ -144,6 +149,7 @@ <h2 class="sectionTitle">LDAP Settings:</h2>
config.LdapAdminFilter = $('#txtLdapAdminFilter', form).val();
config.LdapBindUser = $('#txtLdapBindUser', form).val();
config.LdapBindPassword = $('#txtLdapBindPassword', form).val();
config.EasyPasswordField = $('#txtLdapEasyPasswordAttr', form).val();
config.CreateUsersFromLdap = $("#chkEnableUserCreation", form).checked();
config.LdapPort = parseInt($("#txtLdapPort", form).val() || "389");

Expand Down
10 changes: 5 additions & 5 deletions LDAP-Auth/LDAP-Auth.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<RootNamespace>Jellyfin.Plugin.LDAP_Auth</RootNamespace>
<AssemblyVersion>6.0.0</AssemblyVersion>
<FileVersion>6.0.0</FileVersion>
<AssemblyVersion>7.0.0</AssemblyVersion>
<FileVersion>7.0.0</FileVersion>
</PropertyGroup>
<ItemGroup>
<None Remove="Config\configPage.html" />
Expand All @@ -13,7 +13,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Jellyfin.Controller" Version="10.4-*" />
<PackageReference Include="Novell.Directory.Ldap.NETStandard" Version="2.3.8" />
<PackageReference Include="Jellyfin.Controller" Version="10.5-*" />
<PackageReference Include="Novell.Directory.Ldap.NETStandard" Version="3.0.3" />
</ItemGroup>
</Project>
Loading

0 comments on commit 7ea822e

Please sign in to comment.