1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

MSAL protectedResourceMap VERB based configuration

Discussão em 'Angular' iniciado por Jaroslaw Stadnicki, Setembro 28, 2024.

  1. I'm looking to configure protectedResourceMap with MSAL to differentiate between HTTP verbs. Specifically, I want to set up an open POST endpoint and a protected GET endpoint. Requirements:

    Anonymous POST: When a button is clicked, allow an anonymous action to log that a product has been bought.
    Authenticated POST: If the user is logged in, also add the purchase to their account history.
    Authenticated GET: Fetching purchase history should only be available to logged-in users.


    protectedResourceMap: new Map([
    // Other entries...
    [
    'http://127.0.0.1:5000/api/cart',
    [
    'https://proficiento.onmicrosoft.com/proficiento-api/write',
    'https://proficiento.onmicrosoft.com/proficiento-api/read',
    ],
    ],


    Can I configure protectedResourceMap to differentiate between POST and GET requests for these endpoints? I know i can make it manually, but i dont want to :)

    Continue reading...

Compartilhe esta Página