@delon/auth 13.5.1 → 14.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/index.mjs +2 -1
- package/esm2020/src/auth.config.mjs +1 -1
- package/esm2020/src/auth.module.mjs +5 -5
- package/esm2020/src/social/social.service.mjs +5 -4
- package/esm2020/src/token/base.interceptor.mjs +13 -5
- package/esm2020/src/token/helper.mjs +1 -1
- package/esm2020/src/token/interface.mjs +2 -1
- package/esm2020/src/token/jwt/jwt.guard.mjs +4 -4
- package/esm2020/src/token/jwt/jwt.helper.mjs +2 -1
- package/esm2020/src/token/jwt/jwt.interceptor.mjs +5 -4
- package/esm2020/src/token/jwt/jwt.model.mjs +1 -1
- package/esm2020/src/token/simple/simple.guard.mjs +4 -4
- package/esm2020/src/token/simple/simple.interceptor.mjs +4 -4
- package/esm2020/src/token/simple/simple.model.mjs +1 -1
- package/esm2020/src/token/token.service.mjs +4 -4
- package/esm2020/src/token.mjs +15 -0
- package/fesm2015/auth.mjs +53 -28
- package/fesm2015/auth.mjs.map +1 -1
- package/fesm2020/auth.mjs +53 -28
- package/fesm2020/auth.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/package.json +4 -4
- package/src/auth.config.d.ts +1 -1
- package/src/social/social.service.d.ts +1 -2
- package/src/token/base.interceptor.d.ts +2 -3
- package/src/token/interface.d.ts +3 -4
- package/src/token/jwt/jwt.interceptor.d.ts +1 -2
- package/src/token/jwt/jwt.model.d.ts +3 -4
- package/src/token/simple/simple.interceptor.d.ts +1 -2
- package/src/token/simple/simple.model.d.ts +1 -2
- package/src/token/token.service.d.ts +1 -2
- package/src/token.d.ts +14 -0
- package/auth.d.ts +0 -5
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { HttpRequest } from '@angular/common/http';
|
|
2
2
|
import { AlainAuthConfig } from '@delon/util/config';
|
|
3
|
-
import type { NzSafeAny } from 'ng-zorro-antd/core/types';
|
|
4
3
|
import { BaseInterceptor } from '../base.interceptor';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
/**
|
|
@@ -13,7 +12,7 @@ import * as i0 from "@angular/core";
|
|
|
13
12
|
*/
|
|
14
13
|
export declare class SimpleInterceptor extends BaseInterceptor {
|
|
15
14
|
isAuth(_options: AlainAuthConfig): boolean;
|
|
16
|
-
setReq(req: HttpRequest<
|
|
15
|
+
setReq(req: HttpRequest<any>, options: AlainAuthConfig): HttpRequest<any>;
|
|
17
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<SimpleInterceptor, never>;
|
|
18
17
|
static ɵprov: i0.ɵɵInjectableDeclaration<SimpleInterceptor>;
|
|
19
18
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { NzSafeAny } from 'ng-zorro-antd/core/types';
|
|
2
1
|
import { ITokenModel } from '../interface';
|
|
3
2
|
export declare class SimpleTokenModel implements ITokenModel {
|
|
4
|
-
[key: string]:
|
|
3
|
+
[key: string]: any;
|
|
5
4
|
token: string | null | undefined;
|
|
6
5
|
expired?: number;
|
|
7
6
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { AlainAuthConfig, AlainConfigService } from '@delon/util/config';
|
|
4
|
-
import type { NzSafeAny } from 'ng-zorro-antd/core/types';
|
|
5
4
|
import { IStore } from '../store/interface';
|
|
6
5
|
import { AuthReferrer, ITokenModel, ITokenService } from './interface';
|
|
7
6
|
import * as i0 from "@angular/core";
|
|
@@ -22,7 +21,7 @@ export declare class TokenService implements ITokenService, OnDestroy {
|
|
|
22
21
|
get referrer(): AuthReferrer;
|
|
23
22
|
get options(): AlainAuthConfig;
|
|
24
23
|
set(data: ITokenModel): boolean;
|
|
25
|
-
get(type?:
|
|
24
|
+
get(type?: any): any;
|
|
26
25
|
get<T extends ITokenModel>(type?: new () => T): T;
|
|
27
26
|
clear(options?: {
|
|
28
27
|
onlyToken: boolean;
|
package/src/token.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HttpContextToken } from '@angular/common/http';
|
|
2
|
+
/**
|
|
3
|
+
* Whether to allow anonymous login
|
|
4
|
+
*
|
|
5
|
+
* 是否允许匿名登录
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* this.http.post(`login`, {
|
|
9
|
+
* name: 'cipchk', pwd: '123456'
|
|
10
|
+
* }, {
|
|
11
|
+
* context: new HttpContext().set(ALLOW_ANONYMOUS, true)
|
|
12
|
+
* })
|
|
13
|
+
*/
|
|
14
|
+
export declare const ALLOW_ANONYMOUS: HttpContextToken<boolean>;
|