You are browsing as a guest. Sign up (or log in) to start making projects!

6h 49m 54s logged

oh hi again, i guess my turbo mode is half engaged. i killed the bitflags. YES, the mr “scope” bitflags for the oauth2.1 that would make me recompile the whole backend jsut to add a new scope. like, imagine wanting “boots” to exist and having to type… WITH MY KEYBOARD AND RECOMPILE!? ew. NO MORE! now the scopes live in the settings.toml and get registered on startup. Just push shome keys in the settings, restart and boomby boom new usable scope. I will miss the recompiles… (i will not :])

RIGHT! My beautiful scope registry just stores the identifier (the name, fancy name because.. yes) of the scope with its scope definition. What’s the scope definition? … it already says it in the name, its the definition of the scope that includes, again, the identifier, the description to show in consent pages or when managing an application, the allowed application ids for when you want one scope to only be usable by specific applications because you like controlling everything, the allowed client type (first party or third party) and the required user flags which is like “is this user even allowed to BE OFFERED this scope?.

Scopes are obviously stored now as a text field in the db, parsed like civilized birds with identifiers converted to lowercase, spaces made into “_” aaaand everything else that isnt ascii just gets thrown out. (for example, “MOOOOON BEEPER” -> “mooooon_beeper”).

and course you can ask what youre allowed to use. just ask mr meow meow (meow auth 2) server “hey server, here’s my app, what scopes can i pick?” aand it throws you the scopes you can use filtered by your own user flags, the application’s type and the allowlist. You can also just say “hey servah, what scopes can i use independant of my app (what global scopes you have)?” to get the global scopes.

plus as a little plus plus, now the settings docs are able to push comments on optional types (ahem, the additional oauth scopes).

anyways, SCOPES are configurable, additional oauth scopes do have docs or else you wont even know how the heck you can add them AND you dont need anymore to recompile to add a new scope which is nice in the end. i need to keep uhm clanking my clawsw into the keyboard to finish thing and deploy it. SHALL YOU SEE the most beautiful screenshots of my beautiful doc comment and the handler handling the simplest thing (giving the scope name and descirption, ah so beautiful):

0
4

Comments 0

No comments yet. Be the first!