Browse Source

Merge pull request #19050 from abpframework/auto-merge/rel-8-0/2506

Merge branch rel-8.1 with rel-8.0
pull/19051/head
maliming 3 years ago
committed by GitHub
parent
commit
7f0727c1f4
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  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
**Usage**
### Usage
1.Create an auth-filter.provider
#### 1.Create an auth-filter.provider
```js
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
- `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
- `execute:` a function that stores the skip logic
2.Add to the FeatureConfigModule
#### 2.Add to the FeatureConfigModule
```js
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
**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`

Loading…
Cancel
Save