Merge pull request #24618 from UsainBloot/usainbloot/auth-provider-github-config-declaration

[Auth] fix: Add missing config.d.ts for auth-backend-module-github-provider
This commit is contained in:
Patrik Oldsberg
2024-05-03 17:05:45 +02:00
committed by GitHub
5 changed files with 84 additions and 56 deletions
+7
View File
@@ -0,0 +1,7 @@
---
'@backstage/plugin-auth-backend-module-aws-alb-provider': patch
'@backstage/plugin-auth-backend-module-github-provider': patch
'@backstage/plugin-auth-backend': patch
---
fix: Move config declarations to appropriate auth backend modules
@@ -0,0 +1,27 @@
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export interface Config {
auth?: {
providers?: {
/** @visibility frontend */
awsalb?: {
issuer?: string;
region: string;
};
};
};
}
+34
View File
@@ -0,0 +1,34 @@
/*
* Copyright 2024 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export interface Config {
auth?: {
providers?: {
/** @visibility frontend */
github?: {
[authEnv: string]: {
clientId: string;
/**
* @visibility secret
*/
clientSecret: string;
callbackUrl?: string;
enterpriseInstanceUrl?: string;
};
};
};
};
}
@@ -1,10 +1,10 @@
{
"name": "@backstage/plugin-auth-backend-module-github-provider",
"description": "The github-provider backend module for the auth plugin.",
"version": "0.1.15-next.1",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
"description": "The github-provider backend module for the auth plugin.",
"backstage": {
"role": "backend-plugin-module"
},
"publishConfig": {
"access": "public",
"main": "dist/index.cjs.js",
@@ -15,17 +15,21 @@
"url": "https://github.com/backstage/backstage",
"directory": "plugins/auth-backend-module-github-provider"
},
"backstage": {
"role": "backend-plugin-module"
},
"license": "Apache-2.0",
"main": "src/index.ts",
"types": "src/index.ts",
"files": [
"dist",
"config.d.ts"
],
"scripts": {
"start": "backstage-cli package start",
"build": "backstage-cli package build",
"lint": "backstage-cli package lint",
"test": "backstage-cli package test",
"clean": "backstage-cli package clean",
"lint": "backstage-cli package lint",
"prepack": "backstage-cli package prepack",
"postpack": "backstage-cli package postpack"
"postpack": "backstage-cli package postpack",
"start": "backstage-cli package start",
"test": "backstage-cli package test"
},
"dependencies": {
"@backstage/backend-plugin-api": "workspace:^",
@@ -39,7 +43,5 @@
"@backstage/plugin-auth-backend": "workspace:^",
"supertest": "^6.3.3"
},
"files": [
"dist"
]
"configSchema": "config.d.ts"
}
-42
View File
@@ -89,29 +89,6 @@ export interface Config {
* @additionalProperties true
*/
providers?: {
/** @visibility frontend */
google?: {
[authEnv: string]: {
clientId: string;
/**
* @visibility secret
*/
clientSecret: string;
callbackUrl?: string;
};
};
/** @visibility frontend */
github?: {
[authEnv: string]: {
clientId: string;
/**
* @visibility secret
*/
clientSecret: string;
callbackUrl?: string;
enterpriseInstanceUrl?: string;
};
};
/** @visibility frontend */
saml?: {
entryPoint: string;
@@ -137,20 +114,6 @@ export interface Config {
acceptedClockSkewMs?: number;
};
/** @visibility frontend */
oauth2?: {
[authEnv: string]: {
clientId: string;
/**
* @visibility secret
*/
clientSecret: string;
authorizationUrl: string;
tokenUrl: string;
scope?: string;
disableRefresh?: boolean;
};
};
/** @visibility frontend */
auth0?: {
[authEnv: string]: {
clientId: string;
@@ -177,11 +140,6 @@ export interface Config {
callbackUrl?: string;
};
};
/** @visibility frontend */
awsalb?: {
iss?: string;
region: string;
};
/**
* The backstage token expiration.
*/