Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 1.57 KB

azureb2c.md

File metadata and controls

41 lines (31 loc) · 1.57 KB

Linkek

WebAssembly w Azure B2C

https://docs.microsoft.com/en-us/aspnet/core/blazor/security/webassembly/hosted-with-azure-active-directory-b2c?view=aspnetcore-6.0

User debug Razor component

https://github.com/dotnet/aspnetcore/blob/v6.0.4/src/Components/WebAssembly/testassets/Wasm.Authentication.Client/Pages/User.razor

Authorization policy

builder.Services.AddAuthorization(options=>
    options.AddPolicy("Admin", policy =>
        policy.RequireClaim(
            "http://schemas.microsoft.com/identity/claims/objectidentifier"
            //Vegyünk fel egy-két Object ID-t a regisztrált felhasználók közül
            , "00000000-0000-0000-0000-000000000000"
            , "00000000-0000-0000-0000-000000000000" ))
    
);

Admin policy

/*kóddarabka*/
options.AddPolicy("Admin", policy =>
    policy.RequireClaim(
        "http://schemas.microsoft.com/identity/claims/objectidentifier"
    //Vegyünk fel egy-két Object ID-t a regisztrált felhasználók közül
        , "00000000-0000-0000-0000-000000000000"
        , "00000000-0000-0000-0000-000000000000"));