@backstage/plugin-auth-backend 0.13.1-next.2 → 0.14.1-next.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/CHANGELOG.md +60 -0
- package/dist/index.cjs.js +28 -29
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/migrations/20220522100910_key_field_size.js +49 -0
- package/package.json +10 -10
package/dist/index.d.ts
CHANGED
|
@@ -473,7 +473,6 @@ declare class OAuthEnvironmentHandler implements AuthProviderRouteHandlers {
|
|
|
473
473
|
declare type Options = {
|
|
474
474
|
providerId: string;
|
|
475
475
|
secure: boolean;
|
|
476
|
-
disableRefresh?: boolean;
|
|
477
476
|
persistScopes?: boolean;
|
|
478
477
|
cookieDomain: string;
|
|
479
478
|
cookiePath: string;
|
|
@@ -486,7 +485,7 @@ declare type Options = {
|
|
|
486
485
|
declare class OAuthAdapter implements AuthProviderRouteHandlers {
|
|
487
486
|
private readonly handlers;
|
|
488
487
|
private readonly options;
|
|
489
|
-
static fromConfig(config: AuthProviderConfig, handlers: OAuthHandlers, options: Pick<Options, 'providerId' | 'persistScopes' | '
|
|
488
|
+
static fromConfig(config: AuthProviderConfig, handlers: OAuthHandlers, options: Pick<Options, 'providerId' | 'persistScopes' | 'tokenIssuer' | 'callbackUrl'>): OAuthAdapter;
|
|
490
489
|
private readonly baseCookieOptions;
|
|
491
490
|
constructor(handlers: OAuthHandlers, options: Options);
|
|
492
491
|
start(req: express.Request, res: express.Response): Promise<void>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 The Backstage Authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
// @ts-check
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @param {import('knex').Knex} knex
|
|
21
|
+
*/
|
|
22
|
+
exports.up = async function up(knex) {
|
|
23
|
+
// Sqlite does not support alter column.
|
|
24
|
+
if (!knex.client.config.client.includes('sqlite3')) {
|
|
25
|
+
await knex.schema.alterTable('signing_keys', table => {
|
|
26
|
+
table
|
|
27
|
+
.text('key')
|
|
28
|
+
.notNullable()
|
|
29
|
+
.comment('The serialized signing key')
|
|
30
|
+
.alter({ alterType: true });
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @param {import('knex').Knex} knex
|
|
37
|
+
*/
|
|
38
|
+
exports.down = async function down(knex) {
|
|
39
|
+
// Sqlite does not support alter column.
|
|
40
|
+
if (!knex.client.config.client.includes('sqlite3')) {
|
|
41
|
+
await knex.schema.alterTable('signing_keys', table => {
|
|
42
|
+
table
|
|
43
|
+
.string('key')
|
|
44
|
+
.notNullable()
|
|
45
|
+
.comment('The serialized signing key')
|
|
46
|
+
.alter({ alterType: true });
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-auth-backend",
|
|
3
3
|
"description": "A Backstage backend plugin that handles authentication",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.14.1-next.1",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"clean": "backstage-cli package clean"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@backstage/backend-common": "^0.13.
|
|
37
|
-
"@backstage/catalog-client": "^1.0.
|
|
38
|
-
"@backstage/catalog-model": "^1.0.
|
|
39
|
-
"@backstage/config": "^1.0.1
|
|
36
|
+
"@backstage/backend-common": "^0.13.6-next.1",
|
|
37
|
+
"@backstage/catalog-client": "^1.0.3-next.0",
|
|
38
|
+
"@backstage/catalog-model": "^1.0.3-next.0",
|
|
39
|
+
"@backstage/config": "^1.0.1",
|
|
40
40
|
"@backstage/errors": "^1.0.0",
|
|
41
|
-
"@backstage/plugin-auth-node": "^0.2.
|
|
41
|
+
"@backstage/plugin-auth-node": "^0.2.2-next.1",
|
|
42
42
|
"@backstage/types": "^1.0.0",
|
|
43
43
|
"@google-cloud/firestore": "^5.0.2",
|
|
44
44
|
"@types/express": "^4.17.6",
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
"yn": "^4.0.0"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
-
"@backstage/backend-test-utils": "^0.1.
|
|
80
|
-
"@backstage/cli": "^0.17.
|
|
79
|
+
"@backstage/backend-test-utils": "^0.1.25-next.1",
|
|
80
|
+
"@backstage/cli": "^0.17.2-next.1",
|
|
81
81
|
"@types/body-parser": "^1.19.0",
|
|
82
82
|
"@types/cookie-parser": "^1.4.2",
|
|
83
83
|
"@types/express-session": "^1.17.2",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"@types/passport-saml": "^1.1.3",
|
|
89
89
|
"@types/passport-strategy": "^0.2.35",
|
|
90
90
|
"@types/xml2js": "^0.4.7",
|
|
91
|
-
"msw": "^0.
|
|
91
|
+
"msw": "^0.42.0",
|
|
92
92
|
"supertest": "^6.1.3"
|
|
93
93
|
},
|
|
94
94
|
"files": [
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"config.d.ts"
|
|
98
98
|
],
|
|
99
99
|
"configSchema": "config.d.ts",
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "e15c24ddb5d14034629ced8a5a5d8f12b8f1a7dd"
|
|
101
101
|
}
|