NuGet package | Owin.Framework.Authorization.UI |
GitHub source | OwinFramework.Authorization.UI |
The authorization repository readme file contains documentation on the key concepts around authorization in the Owin Framework. It is strongly recommended that you read it before using this assembly.
To make this UI appear inside a page on your website you need to add a this <div id="auth-ui"></div> to your page. You also need to add a reference to the compiled Javascript. Optionally you can add a reference to the bundled CSS or you can provide your own.
With the default configuration, the asset references in the head of your html page should look like this:
<link rel="stylesheet" href="/ui/authorization/styles.css"> <script async="" src="/ui/authorization/main.dart.js"></script>
builder.Register(ninject.Get<OwinFramework.Authorization.UI.AuthorizationUiMiddleware>()) .As("Authorization UI") .ConfigureWith(config, "/owinFramework/middleware/authorizationUi"); builder.Register(ninject.Get<OwinFramework.Authorization.UI.AuthorizationApiMiddleware>()) .As("Authorization UI API") .ConfigureWith(config, "/owinFramework/middleware/authorizationUi");
The configuration below is the configuration you will get by default if you do not provide a configuration for this middleware.
{ "owinFramework": { "middleware": { "authorizationUi": { "documentationRootUrl": "/owin/authorizationUi/config", "apiRootUrl": "api/authorization", "uiRootUrl": "ui/authorization", "assetsPath": "assets", "permissionToCallApi": "auth:api", "permissionToViewIdentities": "auth:identity.view", "permissionToEditPermissions": "auth:permission.edit", "permissionToEditRoles": "auth:role.edit", "permissionToEditGroups": "auth:group.edit", "permissionToAssignPermissionToRole": "auth:permission.assign", "permissionToAssignRoleToGroup": "auth:role.assign", "permissionToAssignUserToGroup": "auth:group.assign", "identityDisplayNameClaims": "username,email" } } } }