@singularsystems/neo-authorisation
v1.0.3
Published
Client for neo authorisation server
Downloads
235
Keywords
Readme
Neo Authorisation
The neo-authorisation package is the front ent client for the neo authorisation server service.
Setup
In your app setup, register the authorisation module:
import { AuthorisationAppModule } from '@singularsystems/neo-authorisation';
appService.registerModule(AuthorisationAppModule);
Config
Add the following to your main config model:
import { IAuthorisationConfig } from '@singularsystems/neo-authorisation';
public get authorisationConfig(): IAuthorisationConfig {
return {
authorisationServerApiPath: this.authorisationServerApi.apiPath
}
}
Then register the config in your app module:
import { AuthorisationTypes } from '@singularsystems/neo-authorisation';
container.bindConfig(AuthorisationTypes.ConfigModel, (c: Config) => c.authorisationConfig);
View
Add the authorisation route to your routes service:
import { SecurityRoute } from '@singularsystems/neo-authorisation';
or
Create a route referencing the security view:
import { AuthorisationRoles, UserGroupsView } from '@singularsystems/neo-authorisation';
const SecurityRoute = {
name: "User Access",
path: "/security/useraccess",
component: UserGroupsView,
role: AuthorisationRoles.UserAccess.Access }
Add the styles to your app component:
import "@singularsystems/neo-authorisation/styles/authorisation.scss";