arlac77/svelte-session-manager

[Suggestion] Getting entitlements from MS Identity

Opened this issue · 2 comments

Hi,
I'm using this package along with Asp.NET Core WebApi using Microsoft Authentication Library (MSAL).
Everything works great and I've made changes to the server-side payload so they match the package key names.

The package uses Entitlements, While (if I correctly understand it) MS uses what so called Claims
I have made a small library that parse those claims from the JWT stored in the package and used it in my project.
Do you plan to have this implementation to this package? If so then I could make a PR, but first I would like to discuss the best practice for this as so it will have different parsing methods therefore there could be an initialization option to tell the package what type of parsers methods to use according to the payload authentication type.

Thank you :)

We probably need to start thinking about some kind of (lightweight) plugin system to adopt to the different needs.
Is there a free service in the microsoft cloud to play around with MSAL?

Hi, that would be a huge forward step for this package.
I'm using MSAL on my computer, no need to a cloud account.
You can just create new WebApi Reactjs project on Visual Studio and enable identity option during the creation. It will come with the basic MSAL.
Later if you want you can add extra Claims to the payload (eg roles and policies) and use claims key