Browse Source

Format Authorization.md file

pull/19048/head
masumulu28 3 years ago
parent
commit
ea2e0ac14b
  1. 13
      docs/en/UI/Angular/Authorization.md

13
docs/en/UI/Angular/Authorization.md

@ -59,9 +59,9 @@ The `AuthErrorFilterService` is an abstract service that needs to be replaced wi
> By default, this service is replaced in the `@abp/ng.oauth` package > By default, this service is replaced in the `@abp/ng.oauth` package
**Usage** ### Usage
1.Create an auth-filter.provider #### 1.Create an auth-filter.provider
```js ```js
import { APP_INITIALIZER, inject } from '@angular/core'; import { APP_INITIALIZER, inject } from '@angular/core';
@ -96,12 +96,11 @@ function configureAuthFilter() {
``` ```
- `AuthErrorFilter:` is a model for filter object and it have 3 properties - `AuthErrorFilter:` is a model for filter object and it have 3 properties
- `id:` a unique key in the list for the filter object - `id:` a unique key in the list for the filter object
- `executable:` a status for the filter object. If it's false then it won't work, yet it'll stay in the list - `executable:` a status for the filter object. If it's false then it won't work, yet it'll stay in the list
- `execute:` a function that stores the skip logic - `execute:` a function that stores the skip logic
2.Add to the FeatureConfigModule #### 2.Add to the FeatureConfigModule
```js ```js
import { ModuleWithProviders, NgModule } from "@angular/core"; import { ModuleWithProviders, NgModule } from "@angular/core";
@ -120,11 +119,11 @@ export class CustomersConfigModule {
Now it'll skip the clearing of OAuth storage keys for `LinkedUser` grant_type if any `OAuthErrorEvent` occurs Now it'll skip the clearing of OAuth storage keys for `LinkedUser` grant_type if any `OAuthErrorEvent` occurs
**Replace with custom implementation** #### Replace with custom implementation
- Use the `AbstractAuthErrorFilter<T,E>` class for signs of process. Use the `AbstractAuthErrorFilter<T,E>` class for signs of process.
**Example** #### Example
`my-auth-error-filter.service.ts` `my-auth-error-filter.service.ts`

Loading…
Cancel
Save