easyauth.dll
Access backend-app
backend-app
-> Client ID: use Application ID for the client-app
-> Client secret: type secret you created in client app
-> Copy redirect_url -> Create -> Go to Settings page of the client-app
-> Reply URLs => Paste redirect_urlDateOfBirth = June 8, 1970
Startup.ConfigureServices
.
Require claim(s)
services.AddAuthorization(options => options.AddPolicy("EmployeeOnly", policy => policy.RequireClaim("EmployeeNumber")));
Require claim values
services.AddAuthorization(options => options.AddPolicy("Founders", policy => policy.RequireClaim("EmployeeNumber", "1", "2", "3", "4", "5")));
[Authorize(Policy = "EmployeeOnly")]
[Authorize(Roles = "HRManager")]
or [Authorize(Roles = "HRManager,Finance")]
[Authorize]
and [AllowAnonymous]
Startup.ConfigureServices
options.AddPolicy("RequireAdministratorRole", policy => policy.RequireRole("Administrator"))
options.AddPolicy("ElevatedRights", policy =>policy.RequireRole("Administrator", "PowerUser", "BackupAdministrator"));
[Authorize(Policy = "RequireAdministratorRole")]
Encryption Blade
to use custom key.az keyvault create
az secret set
az keyvault secret show
POST {vaultBaseUrl}/keys/{key-name}/create?api-version=7.0
DELETE {vaultBaseUrl}/certificates/{certificate-name}?api-version=7.0
GET {vaultBaseUrl}/secrets/{secret-name}/{secret-version}?api-version=7.0
PATCH {vaultBaseUrl}/secrets/{secret-name}/{secret-version}?api-version=7.0