Skip to content

Commit

Permalink
3.0.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
9p4 committed Feb 16, 2022
1 parent 387fa5c commit e13c403
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 92 deletions.
90 changes: 1 addition & 89 deletions SSO-Auth/Config/configPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,97 +7,9 @@
<div data-role="page" class="page type-interior pluginConfigurationPage esqConfigurationPage">
<div data-role="content">
<div class="content-primary">
<form class="esqConfigurationForm">
<div class="verticalSection verticalSection-extrabottompadding">
<div class="sectionTitleContainer flex align-items-center">
<h2 class="sectionTitle">SSO Settings:</h2>
<a is="emby-button" class="raised button-alt headerHelpButton" target="_blank" href="https://github.com/9p4/jellyfin-plugin-sso">${Help}</a>
</div>
<div class="verticalSection" is="emby-collapse" title="SSO Server Settings">
<button id="newSaml" is="emby-button">
<span>Add new SAML provider</span>
</button>
<button id="newOID" is="emby-button">
<span>Add new OpenID provider</span>
</button>
<div class="collapseContent" id="default">
<div class="samlProviderWrapper">
<div class="samlProvider">
<div class="inputContainer">
<input is="emby-input" type="text" id="txtSamlEndpoint" required placeholder="https://saml-provider.example.com/login" label="SAML Endpoint" />
</div>
<div class="inputContainer">
<input is="emby-input" type="text" id="txtSamlClientId" required placeholder="myjellyfin.example.com" label="SAML Client ID" />
</div>
<div class="inputContainer">
<textarea is="emby-textarea" id="txtSamlCertificate" placeholder="Base64-encoded realm certificate" label="SAML Certificate"></textarea>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input type="checkbox" is="emby-checkbox" id="chkSamlEnable" />
<span>Enable Provider</span>
</label>
</div>
</div>
</div>

<button id="btnSaveSettings" is="emby-button" type="submit" value="submit" class="raised button block">
<span>Update Provider</span>
</button>
</div>
</div>
</div>
</form>
<a href="https://github.com/9p4/jellyfin-plugin-sso/blob/main/README.md">Review the documentation. This plugin is configured via the API.</a>
</div>
</div>


<script type="text/javascript">
var SSOConfigurationPage = {
pluginUniqueId: "505ce9d1-d916-42fa-86ca-673ef241d7df",
};

document.querySelector('.esqConfigurationPage').addEventListener("pageshow", function () {
Dashboard.showLoadingMsg();

window.ApiClient.getPluginConfiguration(SSOConfigurationPage.pluginUniqueId).then(function (config) {
SSOConfigurationPage.txtSamlEndpoint.value = config.SamlEndpoint;
SSOConfigurationPage.txtSamlCertificate.value = config.SamlCertificate;
SSOConfigurationPage.txtSamlClientId.value = config.SamlClientId;
});

Dashboard.hideLoadingMsg();
});

var form = document.querySelector(".esqConfigurationForm");
form.addEventListener("submit", function(e){
e.preventDefault();
Dashboard.showLoadingMsg();

window.ApiClient.getPluginConfiguration(SSOConfigurationPage.pluginUniqueId).then(function (config) {
config.SamlCertificate = SSOConfigurationPage.txtSamlCertificate.value;
config.SamlEndpoint = SSOConfigurationPage.txtSamlEndpoint.value;
config.SamlClientId = SSOConfigurationPage.txtSamlClientId.value;
window.ApiClient.updatePluginConfiguration(SSOConfigurationPage.pluginUniqueId, config).then(Dashboard.processPluginConfigurationUpdateResult);
});

// Disable default form submission
return false;
});

var newSaml = document.getElementById("newSaml");
newSaml.addEventListener("click", function(e) {
e.preventDefault();
Dashboard.showLoadingMsg();
fetch(window.ApiClient.getUrl("sso/SAML/Get?api_key=" + window.ApiClient.accessToken()))
.then(response => {
if (!response.ok) {
throw new Error("HTTP error " + response.status);
}
return response.json();
}).then(json => {console.log(json)});
});
</script>
</div>
</body>
</html>
4 changes: 2 additions & 2 deletions SSO-Auth/SSO-Auth.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Jellyfin.Plugin.SSO_Auth</RootNamespace>
<AssemblyVersion>2.0.1.0</AssemblyVersion>
<FileVersion>2.0.1.0</FileVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<FileVersion>3.0.0.0</FileVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>
Expand Down
3 changes: 2 additions & 1 deletion build.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "SSO Authentication"
guid: "505ce9d1-d916-42fa-86ca-673ef241d7df"
imageUrl: "https://raw.githubusercontent.com/9p4/jellyfin-plugin-sso/main/img/logo.png"
version: "2.0.1.0"
version: "3.0.0.0"
targetAbi: "10.8.0.0"
framework: "net6.0"
owner: "9p4"
Expand All @@ -15,6 +15,7 @@ artifacts:
- "IdentityModel.OidcClient.dll"
- "IdentityModel.dll"
changelog: |
3.0.0.0: Add more RBAC features and option to unregister user from SSO
2.0.1.0: Fix improper artifact loading
2.0.0.0: Add RBAC and Google support
1.0.0.0: Initial Release

0 comments on commit e13c403

Please sign in to comment.