# Runtime Security Service

#### Add the Library

Add the library to your app.

#### App.Config.ts (formerly App.Module.ts)

Import the service and injection token:

```typescript
import { RUNTIMESECURITYSERVICE_INJTOKEN } from 'lib-oga-webui-sharedkernel';
import { RuntimeSecurityService } from 'lib-oga-webui-runtimesecurity';
```

If you are using the mock runtime security service, use this, instead:

```typescript
import { RUNTIMESECURITYSERVICE_V2_INJTOKEN } from 'lib-oga-webui-sharedkernel';
import { RuntimeSecurityService_v2_MOCK } from 'lib-oga-webui-runtimesecurity';
```

Register it with DI, in a provider entry:

```typescript
providers: 
[
  // Register the Runtime Security Service for DI consumption...
  { provide: RUNTIMESECURITYSERVICE_INJTOKEN, useExisting: RuntimeSecurityService },
],
```

If you are using the mock runtime security service, use this, instead:

```typescript
providers: 
[
  // Register the Runtime Security Service for DI consumption...
  { provide: RUNTIMESECURITYSERVICE_V2_INJTOKEN, useExisting: RuntimeSecurityService_v2 },
],
```