@backstage/plugin-auth-backend 0.12.1 → 0.13.0-next.0
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/dist/index.d.ts
CHANGED
|
@@ -397,7 +397,8 @@ declare type Options = {
|
|
|
397
397
|
cookieDomain: string;
|
|
398
398
|
cookiePath: string;
|
|
399
399
|
appOrigin: string;
|
|
400
|
-
|
|
400
|
+
/** @deprecated This option is no longer needed */
|
|
401
|
+
tokenIssuer?: TokenIssuer;
|
|
401
402
|
isOriginAllowed: (origin: string) => boolean;
|
|
402
403
|
callbackUrl: string;
|
|
403
404
|
};
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
*/
|
|
22
22
|
exports.up = async function up(knex) {
|
|
23
23
|
// Sqlite does not support alter column.
|
|
24
|
-
if (knex.client.config.client.includes('sqlite3')) {
|
|
24
|
+
if (!knex.client.config.client.includes('sqlite3')) {
|
|
25
25
|
await knex.schema.alterTable('signing_keys', table => {
|
|
26
26
|
table
|
|
27
27
|
.timestamp('created_at', { useTz: true, precision: 0 })
|
|
@@ -38,7 +38,7 @@ exports.up = async function up(knex) {
|
|
|
38
38
|
*/
|
|
39
39
|
exports.down = async function down(knex) {
|
|
40
40
|
// Sqlite does not support alter column.
|
|
41
|
-
if (knex.client.config.client.includes('sqlite3')) {
|
|
41
|
+
if (!knex.client.config.client.includes('sqlite3')) {
|
|
42
42
|
await knex.schema.alterTable('signing_keys', table => {
|
|
43
43
|
table
|
|
44
44
|
.timestamp('created_at', { useTz: false, precision: 0 })
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2020 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
|
+
// NOTE: This may look like a plain duplicate of the previous one, but that
|
|
20
|
+
// file had a bug added when improving sqlite driver support:
|
|
21
|
+
// https://github.com/backstage/backstage/pull/10053/files#diff-30bb343265e71ca2f1cdcccd5ac8fdbb2a597507c5531bf26945059783377b15R24
|
|
22
|
+
// Since the old file was released to end users, those who created a new
|
|
23
|
+
// Backstage app specifically for PostgreSQL since the release will be missing
|
|
24
|
+
// this fix on their table. So we re-apply it.
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @param {import('knex').Knex} knex
|
|
28
|
+
*/
|
|
29
|
+
exports.up = async function up(knex) {
|
|
30
|
+
// Sqlite does not support alter column.
|
|
31
|
+
if (!knex.client.config.client.includes('sqlite3')) {
|
|
32
|
+
await knex.schema.alterTable('signing_keys', table => {
|
|
33
|
+
table
|
|
34
|
+
.timestamp('created_at', { useTz: true, precision: 0 })
|
|
35
|
+
.notNullable()
|
|
36
|
+
.defaultTo(knex.fn.now())
|
|
37
|
+
.comment('The creation time of the key')
|
|
38
|
+
.alter({ alterType: true });
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @param {import('knex').Knex} knex
|
|
45
|
+
*/
|
|
46
|
+
exports.down = async function down(knex) {
|
|
47
|
+
// Sqlite does not support alter column.
|
|
48
|
+
if (!knex.client.config.client.includes('sqlite3')) {
|
|
49
|
+
await knex.schema.alterTable('signing_keys', table => {
|
|
50
|
+
table
|
|
51
|
+
.timestamp('created_at', { useTz: false, precision: 0 })
|
|
52
|
+
.notNullable()
|
|
53
|
+
.defaultTo(knex.fn.now())
|
|
54
|
+
.comment('The creation time of the key')
|
|
55
|
+
.alter({ alterType: true });
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
};
|
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.13.0-next.0",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"clean": "backstage-cli package clean"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@backstage/backend-common": "^0.13.0",
|
|
37
|
-
"@backstage/catalog-client": "^0.
|
|
38
|
-
"@backstage/catalog-model": "^0.
|
|
39
|
-
"@backstage/config": "^0.
|
|
40
|
-
"@backstage/errors": "^0.
|
|
41
|
-
"@backstage/plugin-auth-node": "^0.
|
|
42
|
-
"@backstage/types": "^0.
|
|
36
|
+
"@backstage/backend-common": "^0.13.2-next.0",
|
|
37
|
+
"@backstage/catalog-client": "^1.0.1-next.0",
|
|
38
|
+
"@backstage/catalog-model": "^1.0.1-next.0",
|
|
39
|
+
"@backstage/config": "^1.0.0",
|
|
40
|
+
"@backstage/errors": "^1.0.0",
|
|
41
|
+
"@backstage/plugin-auth-node": "^0.2.0-next.0",
|
|
42
|
+
"@backstage/types": "^1.0.0",
|
|
43
43
|
"@google-cloud/firestore": "^5.0.2",
|
|
44
44
|
"@types/express": "^4.17.6",
|
|
45
45
|
"@types/passport": "^1.0.3",
|
|
@@ -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.
|
|
79
|
+
"@backstage/backend-test-utils": "^0.1.23-next.0",
|
|
80
|
+
"@backstage/cli": "^0.16.1-next.0",
|
|
81
81
|
"@types/body-parser": "^1.19.0",
|
|
82
82
|
"@types/cookie-parser": "^1.4.2",
|
|
83
83
|
"@types/express-session": "^1.17.2",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"config.d.ts"
|
|
98
98
|
],
|
|
99
99
|
"configSchema": "config.d.ts",
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "6bc4253672337538ce7ea5aadb3e9f60daeb3f80"
|
|
101
101
|
}
|