Skip to content

Instantly share code, notes, and snippets.

View Chaphasilor's full-sized avatar
💬
This is madness but it is GLORIOUS madness!

Chaphasilor

💬
This is madness but it is GLORIOUS madness!
View GitHub Profile
@nielsvanvelzen
nielsvanvelzen / jf-dev-auth.md
Last active May 6, 2024 03:07
Jellyfin API Authorization

Jellyfin API Authorization

To start using the Jellyfin API, authorization is probably the first thing you'll need to do. Jellyfin's authorization options can be a bit confusing because there are a lot of deprecated options.

Generally there are three ways to authenticate: no authorization, user authorization with an access token or authorization with an API key. The first way is easy, just do nothing. But most often you'll need to use either the access token or API key.

Sending authorization values

There are multiple methods for transmitting authorization values, however, some are outdated and scheduled to be removed. It's recommend to use the Authorization header. If header auth isn't an option, the token may be sent through the ApiKey query parameter. Sending secure data in a query parameter is unsafe as the changes of it leaking (via logs, copy-paste actions or by other means) are high. Only use this method as a last resort.

@indaco
indaco / named_colors.md
Last active July 2, 2023 17:05
A named colors approach for color palettes from https://colorsandfonts.com
@zaus
zaus / FormRepo.js
Last active January 13, 2023 01:38
Preserve form values across page loads -- i.e. persistent forms. Uses `localStorage` to persist, `jQuery` for utilities.
var FormRepo = function (namespace) {
/// <summary>Persistent form values, saves to localStorage</summary>
/// <param name="namespace" type="String">the namespace to store values in localStorage</param>
// should also protect per page, since we could have the same forms in various places
this.N = namespace + '.' + window.location.pathname;
};
$.extend(FormRepo.prototype, {
namespace: function (key) {
return this.N + '.' + key;