@loopback/authentication 4.2.4 → 4.2.5
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/CHANGELOG.md +8 -0
- package/dist/keys.d.ts +2 -1
- package/dist/keys.js.map +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/types.js.map +1 -1
- package/package.json +14 -14
- package/src/keys.ts +2 -2
- package/src/types.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.2.5](https://github.com/strongloop/loopback-next/compare/@loopback/authentication@4.2.4...@loopback/authentication@4.2.5) (2020-05-20)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @loopback/authentication
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [4.2.4](https://github.com/strongloop/loopback-next/compare/@loopback/authentication@4.2.3...@loopback/authentication@4.2.4) (2020-05-19)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @loopback/authentication
|
package/dist/keys.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BindingKey } from '@loopback/context';
|
|
2
2
|
import { MetadataAccessor } from '@loopback/metadata';
|
|
3
|
+
import { UserProfile } from '@loopback/security';
|
|
3
4
|
import { AuthenticationComponent } from './authentication.component';
|
|
4
5
|
import { AuthenticateFn, AuthenticationMetadata, AuthenticationStrategy, UserProfileFactory } from './types';
|
|
5
6
|
/**
|
|
@@ -86,7 +87,7 @@ export declare namespace AuthenticationBindings {
|
|
|
86
87
|
*/
|
|
87
88
|
const METADATA: BindingKey<AuthenticationMetadata | undefined>;
|
|
88
89
|
const AUTHENTICATION_STRATEGY_EXTENSION_POINT_NAME = "authentication.strategies";
|
|
89
|
-
const CURRENT_USER: BindingKey<
|
|
90
|
+
const CURRENT_USER: BindingKey<UserProfile>;
|
|
90
91
|
const AUTHENTICATION_REDIRECT_URL: BindingKey<string>;
|
|
91
92
|
const AUTHENTICATION_REDIRECT_STATUS: BindingKey<number>;
|
|
92
93
|
}
|
package/dist/keys.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.js","sourceRoot":"","sources":["../src/keys.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,wCAAwC;AACxC,+CAA+C;AAC/C,gEAAgE;;;AAEhE,+CAA6C;AAC7C,iDAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"keys.js","sourceRoot":"","sources":["../src/keys.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,wCAAwC;AACxC,+CAA+C;AAC/C,gEAAgE;;;AAEhE,+CAA6C;AAC7C,iDAAoD;AACpD,iDAAiE;AASjE;;GAEG;AACH,IAAiB,sBAAsB,CA+GtC;AA/GD,WAAiB,sBAAsB;IACxB,gCAAS,GAAG,oBAAU,CAAC,MAAM,CACxC,oCAAoC,CACrC,CAAC;IAEF;;;;;;;;;;;OAWG;IACH,uDAAuD;IAC1C,2CAAoB,GAAG,oBAAU,CAAC,MAAM,CAEnD,mCAAmC,CAAC,CAAC;IAEvC;;;;;;;;;;OAUG;IACU,+BAAQ,GAAG,oBAAU,CAAC,MAAM,CACvC,yBAAyB,CAC1B,CAAC;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACU,kCAAW,GAAG,oBAAU,CAAC,MAAM,CAC1C,qCAAqC,CACtC,CAAC;IAEF;;;;;;;;;;;;;;;;;;;OAmBG;IACU,+BAAQ,GAAG,oBAAU,CAAC,MAAM,CACvC,kCAAkC,CACnC,CAAC;IAEW,mEAA4C,GACvD,2BAA2B,CAAC;IAE9B,oFAAoF;IACvE,mCAAY,GAA4B,2BAAgB,CAAC,IAAI,CAAC;IAE3E,+CAA+C;IAClC,kDAA2B,GAAG,oBAAU,CAAC,MAAM,CAC1D,6BAA6B,CAC9B,CAAC;IAEF,2FAA2F;IAC9E,qDAA8B,GAAG,oBAAU,CAAC,MAAM,CAC7D,gCAAgC,CACjC,CAAC;AACJ,CAAC,EA/GgB,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QA+GtC;AAED;;GAEG;AACU,QAAA,kCAAkC,GAAG,2BAAgB,CAAC,MAAM,CAGvE,uBAAuB,CAAC,CAAC;AAE3B;;GAEG;AACU,QAAA,2BAA2B,GAAG,0CAAkC,CAAC;AAE9E;;GAEG;AACU,QAAA,iCAAiC,GAAG,2BAAgB,CAAC,MAAM,CAGtE,sBAAsB,CAAC,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BindingTemplate, Constructor, Context } from '@loopback/core';
|
|
1
|
+
import { Binding, BindingTemplate, Constructor, Context } from '@loopback/core';
|
|
2
2
|
import { Request, RedirectRoute } from '@loopback/rest';
|
|
3
3
|
import { UserProfile } from '@loopback/security';
|
|
4
4
|
/**
|
|
@@ -82,7 +82,7 @@ export declare const USER_PROFILE_NOT_FOUND = "USER_PROFILE_NOT_FOUND";
|
|
|
82
82
|
* @param context - Context object
|
|
83
83
|
* @param strategyClass - Class for the authentication strategy
|
|
84
84
|
*/
|
|
85
|
-
export declare function registerAuthenticationStrategy(context: Context, strategyClass: Constructor<AuthenticationStrategy>):
|
|
85
|
+
export declare function registerAuthenticationStrategy(context: Context, strategyClass: Constructor<AuthenticationStrategy>): Binding<unknown>;
|
|
86
86
|
/**
|
|
87
87
|
* A binding template for auth strategy contributor extensions
|
|
88
88
|
*/
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,wCAAwC;AACxC,+CAA+C;AAC/C,gEAAgE;;;AAEhE,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,wCAAwC;AACxC,+CAA+C;AAC/C,gEAAgE;;;AAEhE,yCAOwB;AAGxB,iCAA8C;AAgFjC,QAAA,iCAAiC,GAC5C,mCAAmC,CAAC;AAEzB,QAAA,sBAAsB,GAAG,wBAAwB,CAAC;AAE/D;;;;;;;GAOG;AACH,SAAgB,8BAA8B,CAC5C,OAAgB,EAChB,aAAkD;IAElD,OAAO,mBAAY,CACjB,OAAO,EACP,6BAAsB,CAAC,4CAA4C,EACnE,aAAa,EACb;QACE,SAAS,EACP,6BAAsB,CAAC,4CAA4C;KACtE,CACF,CAAC;AACJ,CAAC;AAbD,wEAaC;AAED;;GAEG;AACU,QAAA,cAAc,GAAoB,OAAO,CAAC,EAAE;IACvD,mBAAY,CACV,6BAAsB,CAAC,4CAA4C,CACpE,CAAC,OAAO,CAAC,CAAC;IACX,OAAO,CAAC,GAAG,CAAC;QACV,SAAS,EACP,6BAAsB,CAAC,4CAA4C;KACtE,CAAC,CAAC;AACL,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loopback/authentication",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.5",
|
|
4
4
|
"description": "A LoopBack component for authentication support.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,23 +21,23 @@
|
|
|
21
21
|
"copyright.owner": "IBM Corp.",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@loopback/context": "^3.8.
|
|
25
|
-
"@loopback/core": "^2.
|
|
26
|
-
"@loopback/metadata": "^2.1.
|
|
27
|
-
"@loopback/openapi-v3": "^3.4.
|
|
28
|
-
"@loopback/rest": "^5.0.
|
|
29
|
-
"@loopback/security": "^0.2.
|
|
24
|
+
"@loopback/context": "^3.8.1",
|
|
25
|
+
"@loopback/core": "^2.7.0",
|
|
26
|
+
"@loopback/metadata": "^2.1.5",
|
|
27
|
+
"@loopback/openapi-v3": "^3.4.1",
|
|
28
|
+
"@loopback/rest": "^5.0.1",
|
|
29
|
+
"@loopback/security": "^0.2.10",
|
|
30
30
|
"@types/express": "^4.17.6",
|
|
31
|
-
"@types/lodash": "^4.14.
|
|
31
|
+
"@types/lodash": "^4.14.152",
|
|
32
32
|
"lodash": "^4.17.15",
|
|
33
33
|
"tslib": "^2.0.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@loopback/build": "^5.4.
|
|
37
|
-
"@loopback/eslint-config": "^7.0.
|
|
38
|
-
"@loopback/openapi-spec-builder": "^2.1.
|
|
39
|
-
"@loopback/testlab": "^3.1.
|
|
40
|
-
"@types/node": "^10.17.
|
|
36
|
+
"@loopback/build": "^5.4.1",
|
|
37
|
+
"@loopback/eslint-config": "^7.0.1",
|
|
38
|
+
"@loopback/openapi-spec-builder": "^2.1.5",
|
|
39
|
+
"@loopback/testlab": "^3.1.5",
|
|
40
|
+
"@types/node": "^10.17.24",
|
|
41
41
|
"jsonwebtoken": "^8.5.1"
|
|
42
42
|
},
|
|
43
43
|
"keywords": [
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"url": "https://github.com/strongloop/loopback-next.git",
|
|
56
56
|
"directory": "packages/authentication"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "62aea854bf85c5a5995b59e6908fe5409f7eea96"
|
|
59
59
|
}
|
package/src/keys.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import {BindingKey} from '@loopback/context';
|
|
7
7
|
import {MetadataAccessor} from '@loopback/metadata';
|
|
8
|
-
import {SecurityBindings} from '@loopback/security';
|
|
8
|
+
import {SecurityBindings, UserProfile} from '@loopback/security';
|
|
9
9
|
import {AuthenticationComponent} from './authentication.component';
|
|
10
10
|
import {
|
|
11
11
|
AuthenticateFn,
|
|
@@ -117,7 +117,7 @@ export namespace AuthenticationBindings {
|
|
|
117
117
|
'authentication.strategies';
|
|
118
118
|
|
|
119
119
|
// Make `CURRENT_USER` the alias of SecurityBindings.USER for backward compatibility
|
|
120
|
-
export const CURRENT_USER = SecurityBindings.USER;
|
|
120
|
+
export const CURRENT_USER: BindingKey<UserProfile> = SecurityBindings.USER;
|
|
121
121
|
|
|
122
122
|
// Redirect url for authenticating current user
|
|
123
123
|
export const AUTHENTICATION_REDIRECT_URL = BindingKey.create<string>(
|
package/src/types.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
7
|
addExtension,
|
|
8
|
+
Binding,
|
|
8
9
|
BindingTemplate,
|
|
9
10
|
Constructor,
|
|
10
11
|
Context,
|
|
@@ -108,7 +109,7 @@ export const USER_PROFILE_NOT_FOUND = 'USER_PROFILE_NOT_FOUND';
|
|
|
108
109
|
export function registerAuthenticationStrategy(
|
|
109
110
|
context: Context,
|
|
110
111
|
strategyClass: Constructor<AuthenticationStrategy>,
|
|
111
|
-
) {
|
|
112
|
+
): Binding<unknown> {
|
|
112
113
|
return addExtension(
|
|
113
114
|
context,
|
|
114
115
|
AuthenticationBindings.AUTHENTICATION_STRATEGY_EXTENSION_POINT_NAME,
|