@red-hat-developer-hub/backstage-plugin-app-auth 0.0.2 → 0.0.3
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 +6 -0
- package/README.md +2 -2
- package/dist/AuthApiRefs.esm.js +7 -1
- package/dist/AuthApiRefs.esm.js.map +1 -1
- package/dist/alpha.d.ts +18 -2
- package/dist/alpha.esm.js +1 -1
- package/dist/appAuthModule.esm.js +53 -2
- package/dist/appAuthModule.esm.js.map +1 -1
- package/dist/components/SignInPage.esm.js +19 -1
- package/dist/components/SignInPage.esm.js.map +1 -1
- package/dist/translations/signIn.esm.js +8 -0
- package/dist/translations/signIn.esm.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @red-hat-developer-hub/backstage-plugin-app-auth
|
|
2
2
|
|
|
3
|
-
RHDH sign-in page (multi-provider) and OIDC / Auth0 / SAML frontend OAuth2 APIs for the **new frontend system**, registered against `pluginId: 'app'`.
|
|
3
|
+
RHDH sign-in page (multi-provider) and OIDC / Keycloak / PingFederate / Auth0 / SAML frontend OAuth2 APIs for the **new frontend system**, registered against `pluginId: 'app'`.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
@@ -9,4 +9,4 @@ RHDH sign-in page (multi-provider) and OIDC / Auth0 / SAML frontend OAuth2 APIs
|
|
|
9
9
|
|
|
10
10
|
## Config
|
|
11
11
|
|
|
12
|
-
Root `signInPage` (string or string[]) selects which providers appear; see `config.d.ts`.
|
|
12
|
+
Root `signInPage` (string or string[]) selects which providers appear; see `config.d.ts`. Provider ids include `oidc`, `keycloak`, and `pingfederate` (OIDC-backed; backend `auth.providers` keys must match).
|
package/dist/AuthApiRefs.esm.js
CHANGED
|
@@ -3,6 +3,12 @@ import { createApiRef } from '@backstage/core-plugin-api';
|
|
|
3
3
|
const oidcAuthApiRef = createApiRef({
|
|
4
4
|
id: "internal.auth.oidc"
|
|
5
5
|
});
|
|
6
|
+
const keycloakAuthApiRef = createApiRef({
|
|
7
|
+
id: "internal.auth.keycloak"
|
|
8
|
+
});
|
|
9
|
+
const pingfederateAuthApiRef = createApiRef({
|
|
10
|
+
id: "internal.auth.pingfederate"
|
|
11
|
+
});
|
|
6
12
|
const auth0AuthApiRef = createApiRef({
|
|
7
13
|
id: "internal.auth.auth0"
|
|
8
14
|
});
|
|
@@ -10,5 +16,5 @@ const samlAuthApiRef = createApiRef({
|
|
|
10
16
|
id: "internal.auth.saml"
|
|
11
17
|
});
|
|
12
18
|
|
|
13
|
-
export { auth0AuthApiRef, oidcAuthApiRef, samlAuthApiRef };
|
|
19
|
+
export { auth0AuthApiRef, keycloakAuthApiRef, oidcAuthApiRef, pingfederateAuthApiRef, samlAuthApiRef };
|
|
14
20
|
//# sourceMappingURL=AuthApiRefs.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthApiRefs.esm.js","sources":["../src/AuthApiRefs.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createApiRef,\n type ApiRef,\n type BackstageIdentityApi,\n type OAuthApi,\n type OpenIdConnectApi,\n type ProfileInfoApi,\n type SessionApi,\n} from '@backstage/core-plugin-api';\n\n/**\n * Combined surface for custom RHDH auth APIs backed by `OAuth2` in the app module.\n *\n * @alpha\n */\nexport type CustomAuthApiRefType = OAuthApi &\n OpenIdConnectApi &\n ProfileInfoApi &\n BackstageIdentityApi &\n SessionApi;\n\n/**\n * OIDC auth API for the RHDH multi-provider sign-in page.\n *\n * @alpha\n */\nexport const oidcAuthApiRef: ApiRef<CustomAuthApiRefType> = createApiRef({\n id: 'internal.auth.oidc',\n});\n\n/**\n * Auth0 auth API for the RHDH multi-provider sign-in page.\n *\n * @alpha\n */\nexport const auth0AuthApiRef: ApiRef<CustomAuthApiRefType> = createApiRef({\n id: 'internal.auth.auth0',\n});\n\n/**\n * SAML auth API for the RHDH multi-provider sign-in page.\n *\n * @alpha\n */\nexport const samlAuthApiRef: ApiRef<CustomAuthApiRefType> = createApiRef({\n id: 'internal.auth.saml',\n});\n"],"names":[],"mappings":";;AA0CO,MAAM,iBAA+C,YAAA,CAAa;AAAA,EACvE,EAAA,EAAI;AACN,CAAC;AAOM,MAAM,kBAAgD,YAAA,CAAa;AAAA,EACxE,EAAA,EAAI;AACN,CAAC;AAOM,MAAM,iBAA+C,YAAA,CAAa;AAAA,EACvE,EAAA,EAAI;AACN,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"AuthApiRefs.esm.js","sources":["../src/AuthApiRefs.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createApiRef,\n type ApiRef,\n type BackstageIdentityApi,\n type OAuthApi,\n type OpenIdConnectApi,\n type ProfileInfoApi,\n type SessionApi,\n} from '@backstage/core-plugin-api';\n\n/**\n * Combined surface for custom RHDH auth APIs backed by `OAuth2` in the app module.\n *\n * @alpha\n */\nexport type CustomAuthApiRefType = OAuthApi &\n OpenIdConnectApi &\n ProfileInfoApi &\n BackstageIdentityApi &\n SessionApi;\n\n/**\n * OIDC auth API for the RHDH multi-provider sign-in page.\n *\n * @alpha\n */\nexport const oidcAuthApiRef: ApiRef<CustomAuthApiRefType> = createApiRef({\n id: 'internal.auth.oidc',\n});\n\n/**\n * Keycloak auth API for the RHDH multi-provider sign-in page (OIDC-backed).\n *\n * @alpha\n */\nexport const keycloakAuthApiRef: ApiRef<CustomAuthApiRefType> = createApiRef({\n id: 'internal.auth.keycloak',\n});\n\n/**\n * PingFederate auth API for the RHDH multi-provider sign-in page (OIDC-backed).\n *\n * @alpha\n */\nexport const pingfederateAuthApiRef: ApiRef<CustomAuthApiRefType> =\n createApiRef({\n id: 'internal.auth.pingfederate',\n });\n\n/**\n * Auth0 auth API for the RHDH multi-provider sign-in page.\n *\n * @alpha\n */\nexport const auth0AuthApiRef: ApiRef<CustomAuthApiRefType> = createApiRef({\n id: 'internal.auth.auth0',\n});\n\n/**\n * SAML auth API for the RHDH multi-provider sign-in page.\n *\n * @alpha\n */\nexport const samlAuthApiRef: ApiRef<CustomAuthApiRefType> = createApiRef({\n id: 'internal.auth.saml',\n});\n"],"names":[],"mappings":";;AA0CO,MAAM,iBAA+C,YAAA,CAAa;AAAA,EACvE,EAAA,EAAI;AACN,CAAC;AAOM,MAAM,qBAAmD,YAAA,CAAa;AAAA,EAC3E,EAAA,EAAI;AACN,CAAC;AAOM,MAAM,yBACX,YAAA,CAAa;AAAA,EACX,EAAA,EAAI;AACN,CAAC;AAOI,MAAM,kBAAgD,YAAA,CAAa;AAAA,EACxE,EAAA,EAAI;AACN,CAAC;AAOM,MAAM,iBAA+C,YAAA,CAAa;AAAA,EACvE,EAAA,EAAI;AACN,CAAC;;;;"}
|
package/dist/alpha.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api'
|
|
|
2
2
|
import { SignInPageProps, OAuthApi, OpenIdConnectApi, ProfileInfoApi, BackstageIdentityApi, SessionApi, ApiRef } from '@backstage/core-plugin-api';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* RHDH app sign-in page plus OIDC, Auth0, and SAML OAuth2 frontend APIs (`pluginId: app`).
|
|
5
|
+
* RHDH app sign-in page plus OIDC, Keycloak, PingFederate, Auth0, and SAML OAuth2 frontend APIs (`pluginId: app`).
|
|
6
6
|
* Default-export this module for dynamic frontend loading.
|
|
7
7
|
*
|
|
8
8
|
* @alpha
|
|
@@ -28,6 +28,18 @@ type CustomAuthApiRefType = OAuthApi & OpenIdConnectApi & ProfileInfoApi & Backs
|
|
|
28
28
|
* @alpha
|
|
29
29
|
*/
|
|
30
30
|
declare const oidcAuthApiRef: ApiRef<CustomAuthApiRefType>;
|
|
31
|
+
/**
|
|
32
|
+
* Keycloak auth API for the RHDH multi-provider sign-in page (OIDC-backed).
|
|
33
|
+
*
|
|
34
|
+
* @alpha
|
|
35
|
+
*/
|
|
36
|
+
declare const keycloakAuthApiRef: ApiRef<CustomAuthApiRefType>;
|
|
37
|
+
/**
|
|
38
|
+
* PingFederate auth API for the RHDH multi-provider sign-in page (OIDC-backed).
|
|
39
|
+
*
|
|
40
|
+
* @alpha
|
|
41
|
+
*/
|
|
42
|
+
declare const pingfederateAuthApiRef: ApiRef<CustomAuthApiRefType>;
|
|
31
43
|
/**
|
|
32
44
|
* Auth0 auth API for the RHDH multi-provider sign-in page.
|
|
33
45
|
*
|
|
@@ -69,6 +81,10 @@ declare const signInTranslationRef: _backstage_frontend_plugin_api.TranslationRe
|
|
|
69
81
|
readonly "signIn.providers.google.message": "Sign in using Google";
|
|
70
82
|
readonly "signIn.providers.oidc.title": "OIDC";
|
|
71
83
|
readonly "signIn.providers.oidc.message": "Sign in using OIDC";
|
|
84
|
+
readonly "signIn.providers.keycloak.title": "Keycloak";
|
|
85
|
+
readonly "signIn.providers.keycloak.message": "Sign in using Keycloak";
|
|
86
|
+
readonly "signIn.providers.pingfederate.title": "PingFederate";
|
|
87
|
+
readonly "signIn.providers.pingfederate.message": "Sign in using PingFederate";
|
|
72
88
|
readonly "signIn.providers.okta.title": "Okta";
|
|
73
89
|
readonly "signIn.providers.okta.message": "Sign in using Okta";
|
|
74
90
|
readonly "signIn.providers.onelogin.title": "OneLogin";
|
|
@@ -77,5 +93,5 @@ declare const signInTranslationRef: _backstage_frontend_plugin_api.TranslationRe
|
|
|
77
93
|
readonly "signIn.providers.saml.message": "Sign in using SAML";
|
|
78
94
|
}>;
|
|
79
95
|
|
|
80
|
-
export { SignInPage, appAuthModule, auth0AuthApiRef, appAuthModule as default, oidcAuthApiRef, samlAuthApiRef, signInTranslationRef };
|
|
96
|
+
export { SignInPage, appAuthModule, auth0AuthApiRef, appAuthModule as default, keycloakAuthApiRef, oidcAuthApiRef, pingfederateAuthApiRef, samlAuthApiRef, signInTranslationRef };
|
|
81
97
|
export type { CustomAuthApiRefType };
|
package/dist/alpha.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { appAuthModule, appAuthModule as default } from './appAuthModule.esm.js';
|
|
2
2
|
export { SignInPage } from './components/SignInPage.esm.js';
|
|
3
|
-
export { auth0AuthApiRef, oidcAuthApiRef, samlAuthApiRef } from './AuthApiRefs.esm.js';
|
|
3
|
+
export { auth0AuthApiRef, keycloakAuthApiRef, oidcAuthApiRef, pingfederateAuthApiRef, samlAuthApiRef } from './AuthApiRefs.esm.js';
|
|
4
4
|
export { signInTranslationRef } from './translations/signIn.esm.js';
|
|
5
5
|
//# sourceMappingURL=alpha.esm.js.map
|
|
@@ -3,7 +3,7 @@ import { OAuth2 } from '@backstage/core-app-api';
|
|
|
3
3
|
import { configApiRef, oauthRequestApiRef, discoveryApiRef } from '@backstage/core-plugin-api';
|
|
4
4
|
import { ApiBlueprint, createFrontendModule } from '@backstage/frontend-plugin-api';
|
|
5
5
|
import appPlugin from '@backstage/plugin-app';
|
|
6
|
-
import { oidcAuthApiRef, auth0AuthApiRef, samlAuthApiRef } from './AuthApiRefs.esm.js';
|
|
6
|
+
import { oidcAuthApiRef, keycloakAuthApiRef, pingfederateAuthApiRef, auth0AuthApiRef, samlAuthApiRef } from './AuthApiRefs.esm.js';
|
|
7
7
|
import { SignInPage } from './components/SignInPage.esm.js';
|
|
8
8
|
|
|
9
9
|
const oidcAuthApi = ApiBlueprint.make({
|
|
@@ -28,6 +28,50 @@ const oidcAuthApi = ApiBlueprint.make({
|
|
|
28
28
|
})
|
|
29
29
|
})
|
|
30
30
|
});
|
|
31
|
+
const keycloakAuthApi = ApiBlueprint.make({
|
|
32
|
+
name: "keycloak-auth",
|
|
33
|
+
params: (defineParams) => defineParams({
|
|
34
|
+
api: keycloakAuthApiRef,
|
|
35
|
+
deps: {
|
|
36
|
+
discoveryApi: discoveryApiRef,
|
|
37
|
+
oauthRequestApi: oauthRequestApiRef,
|
|
38
|
+
configApi: configApiRef
|
|
39
|
+
},
|
|
40
|
+
factory: ({ discoveryApi, oauthRequestApi, configApi }) => OAuth2.create({
|
|
41
|
+
configApi,
|
|
42
|
+
discoveryApi,
|
|
43
|
+
oauthRequestApi,
|
|
44
|
+
provider: {
|
|
45
|
+
id: "keycloak",
|
|
46
|
+
title: "Keycloak",
|
|
47
|
+
icon: () => null
|
|
48
|
+
},
|
|
49
|
+
environment: configApi.getOptionalString("auth.environment")
|
|
50
|
+
})
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
const pingfederateAuthApi = ApiBlueprint.make({
|
|
54
|
+
name: "pingfederate-auth",
|
|
55
|
+
params: (defineParams) => defineParams({
|
|
56
|
+
api: pingfederateAuthApiRef,
|
|
57
|
+
deps: {
|
|
58
|
+
discoveryApi: discoveryApiRef,
|
|
59
|
+
oauthRequestApi: oauthRequestApiRef,
|
|
60
|
+
configApi: configApiRef
|
|
61
|
+
},
|
|
62
|
+
factory: ({ discoveryApi, oauthRequestApi, configApi }) => OAuth2.create({
|
|
63
|
+
configApi,
|
|
64
|
+
discoveryApi,
|
|
65
|
+
oauthRequestApi,
|
|
66
|
+
provider: {
|
|
67
|
+
id: "pingfederate",
|
|
68
|
+
title: "PingFederate",
|
|
69
|
+
icon: () => null
|
|
70
|
+
},
|
|
71
|
+
environment: configApi.getOptionalString("auth.environment")
|
|
72
|
+
})
|
|
73
|
+
})
|
|
74
|
+
});
|
|
31
75
|
const auth0AuthApi = ApiBlueprint.make({
|
|
32
76
|
name: "auth0-auth",
|
|
33
77
|
params: (defineParams) => defineParams({
|
|
@@ -78,7 +122,14 @@ const signInPageOverride = appPlugin.getExtension("sign-in-page:app").override({
|
|
|
78
122
|
});
|
|
79
123
|
const appAuthModule = createFrontendModule({
|
|
80
124
|
pluginId: "app",
|
|
81
|
-
extensions: [
|
|
125
|
+
extensions: [
|
|
126
|
+
signInPageOverride,
|
|
127
|
+
oidcAuthApi,
|
|
128
|
+
keycloakAuthApi,
|
|
129
|
+
pingfederateAuthApi,
|
|
130
|
+
auth0AuthApi,
|
|
131
|
+
samlAuthApi
|
|
132
|
+
]
|
|
82
133
|
});
|
|
83
134
|
|
|
84
135
|
export { appAuthModule };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appAuthModule.esm.js","sources":["../src/appAuthModule.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OAuth2 } from '@backstage/core-app-api';\nimport {\n configApiRef,\n discoveryApiRef,\n oauthRequestApiRef,\n} from '@backstage/core-plugin-api';\nimport {\n ApiBlueprint,\n createFrontendModule,\n} from '@backstage/frontend-plugin-api';\nimport appPlugin from '@backstage/plugin-app';\n\nimport {
|
|
1
|
+
{"version":3,"file":"appAuthModule.esm.js","sources":["../src/appAuthModule.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OAuth2 } from '@backstage/core-app-api';\nimport {\n configApiRef,\n discoveryApiRef,\n oauthRequestApiRef,\n} from '@backstage/core-plugin-api';\nimport {\n ApiBlueprint,\n createFrontendModule,\n} from '@backstage/frontend-plugin-api';\nimport appPlugin from '@backstage/plugin-app';\n\nimport {\n auth0AuthApiRef,\n keycloakAuthApiRef,\n oidcAuthApiRef,\n pingfederateAuthApiRef,\n samlAuthApiRef,\n} from './AuthApiRefs';\nimport { SignInPage } from './components/SignInPage';\n\nconst oidcAuthApi = ApiBlueprint.make({\n name: 'oidc-auth',\n params: defineParams =>\n defineParams({\n api: oidcAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n OAuth2.create({\n configApi,\n discoveryApi,\n oauthRequestApi: oauthRequestApi,\n provider: {\n id: 'oidc',\n title: 'OIDC',\n icon: () => null,\n },\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n});\n\nconst keycloakAuthApi = ApiBlueprint.make({\n name: 'keycloak-auth',\n params: defineParams =>\n defineParams({\n api: keycloakAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n OAuth2.create({\n configApi,\n discoveryApi,\n oauthRequestApi: oauthRequestApi,\n provider: {\n id: 'keycloak',\n title: 'Keycloak',\n icon: () => null,\n },\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n});\n\nconst pingfederateAuthApi = ApiBlueprint.make({\n name: 'pingfederate-auth',\n params: defineParams =>\n defineParams({\n api: pingfederateAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n OAuth2.create({\n configApi,\n discoveryApi,\n oauthRequestApi: oauthRequestApi,\n provider: {\n id: 'pingfederate',\n title: 'PingFederate',\n icon: () => null,\n },\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n});\n\nconst auth0AuthApi = ApiBlueprint.make({\n name: 'auth0-auth',\n params: defineParams =>\n defineParams({\n api: auth0AuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n OAuth2.create({\n discoveryApi,\n oauthRequestApi: oauthRequestApi,\n provider: {\n id: 'auth0',\n title: 'Auth0',\n icon: () => null,\n },\n defaultScopes: ['openid', 'email', 'profile'],\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n});\n\nconst samlAuthApi = ApiBlueprint.make({\n name: 'saml-auth',\n params: defineParams =>\n defineParams({\n api: samlAuthApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n oauthRequestApi: oauthRequestApiRef,\n configApi: configApiRef,\n },\n factory: ({ discoveryApi, oauthRequestApi, configApi }) =>\n OAuth2.create({\n discoveryApi,\n oauthRequestApi: oauthRequestApi,\n provider: {\n id: 'saml',\n title: 'SAML',\n icon: () => null,\n },\n environment: configApi.getOptionalString('auth.environment'),\n }),\n }),\n});\n\nconst signInPageOverride = appPlugin.getExtension('sign-in-page:app').override({\n params: {\n loader: async () => (props: Parameters<typeof SignInPage>[0]) =>\n <SignInPage {...props} />,\n },\n});\n\n/**\n * RHDH app sign-in page plus OIDC, Keycloak, PingFederate, Auth0, and SAML OAuth2 frontend APIs (`pluginId: app`).\n * Default-export this module for dynamic frontend loading.\n *\n * @alpha\n */\nexport const appAuthModule = createFrontendModule({\n pluginId: 'app',\n extensions: [\n signInPageOverride,\n oidcAuthApi,\n keycloakAuthApi,\n pingfederateAuthApi,\n auth0AuthApi,\n samlAuthApi,\n ],\n});\n"],"names":[],"mappings":";;;;;;;;AAqCA,MAAM,WAAA,GAAc,aAAa,IAAA,CAAK;AAAA,EACpC,IAAA,EAAM,WAAA;AAAA,EACN,MAAA,EAAQ,kBACN,YAAA,CAAa;AAAA,IACX,GAAA,EAAK,cAAA;AAAA,IACL,IAAA,EAAM;AAAA,MACJ,YAAA,EAAc,eAAA;AAAA,MACd,eAAA,EAAiB,kBAAA;AAAA,MACjB,SAAA,EAAW;AAAA,KACb;AAAA,IACA,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,iBAAiB,SAAA,EAAU,KACnD,OAAO,MAAA,CAAO;AAAA,MACZ,SAAA;AAAA,MACA,YAAA;AAAA,MACA,eAAA;AAAA,MACA,QAAA,EAAU;AAAA,QACR,EAAA,EAAI,MAAA;AAAA,QACJ,KAAA,EAAO,MAAA;AAAA,QACP,MAAM,MAAM;AAAA,OACd;AAAA,MACA,WAAA,EAAa,SAAA,CAAU,iBAAA,CAAkB,kBAAkB;AAAA,KAC5D;AAAA,GACJ;AACL,CAAC,CAAA;AAED,MAAM,eAAA,GAAkB,aAAa,IAAA,CAAK;AAAA,EACxC,IAAA,EAAM,eAAA;AAAA,EACN,MAAA,EAAQ,kBACN,YAAA,CAAa;AAAA,IACX,GAAA,EAAK,kBAAA;AAAA,IACL,IAAA,EAAM;AAAA,MACJ,YAAA,EAAc,eAAA;AAAA,MACd,eAAA,EAAiB,kBAAA;AAAA,MACjB,SAAA,EAAW;AAAA,KACb;AAAA,IACA,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,iBAAiB,SAAA,EAAU,KACnD,OAAO,MAAA,CAAO;AAA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AAA,IACV,kBAAA;AAAA,IACA,WAAA;AAAA,IACA,eAAA;AAAA,IACA,mBAAA;AAAA,IACA,YAAA;AAAA,IACA;AAAA;AAEJ,CAAC;;;;"}
|
|
@@ -3,7 +3,7 @@ import { ErrorPanel, ProxiedSignInPage, SignInPage as SignInPage$1 } from '@back
|
|
|
3
3
|
import { useApi, configApiRef, atlassianAuthApiRef, microsoftAuthApiRef, bitbucketAuthApiRef, bitbucketServerAuthApiRef, githubAuthApiRef, gitlabAuthApiRef, googleAuthApiRef, oktaAuthApiRef, oneloginAuthApiRef } from '@backstage/core-plugin-api';
|
|
4
4
|
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
5
5
|
import Typography from '@mui/material/Typography';
|
|
6
|
-
import { auth0AuthApiRef, oidcAuthApiRef, samlAuthApiRef } from '../AuthApiRefs.esm.js';
|
|
6
|
+
import { auth0AuthApiRef, oidcAuthApiRef, keycloakAuthApiRef, pingfederateAuthApiRef, samlAuthApiRef } from '../AuthApiRefs.esm.js';
|
|
7
7
|
import { signInTranslationRef } from '../translations/signIn.esm.js';
|
|
8
8
|
|
|
9
9
|
const DEFAULT_PROVIDER = "github";
|
|
@@ -92,6 +92,24 @@ const createProviders = (t) => /* @__PURE__ */ new Map([
|
|
|
92
92
|
apiRef: oidcAuthApiRef
|
|
93
93
|
}
|
|
94
94
|
],
|
|
95
|
+
[
|
|
96
|
+
"keycloak",
|
|
97
|
+
{
|
|
98
|
+
id: "keycloak-auth-provider",
|
|
99
|
+
title: t("signIn.providers.keycloak.title"),
|
|
100
|
+
message: t("signIn.providers.keycloak.message"),
|
|
101
|
+
apiRef: keycloakAuthApiRef
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
[
|
|
105
|
+
"pingfederate",
|
|
106
|
+
{
|
|
107
|
+
id: "pingfederate-auth-provider",
|
|
108
|
+
title: t("signIn.providers.pingfederate.title"),
|
|
109
|
+
message: t("signIn.providers.pingfederate.message"),
|
|
110
|
+
apiRef: pingfederateAuthApiRef
|
|
111
|
+
}
|
|
112
|
+
],
|
|
95
113
|
[
|
|
96
114
|
"okta",
|
|
97
115
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignInPage.esm.js","sources":["../../src/components/SignInPage.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n ErrorPanel,\n SignInPage as CCSignInPage,\n ProxiedSignInPage,\n type SignInProviderConfig,\n} from '@backstage/core-components';\nimport {\n atlassianAuthApiRef,\n bitbucketAuthApiRef,\n bitbucketServerAuthApiRef,\n configApiRef,\n githubAuthApiRef,\n gitlabAuthApiRef,\n googleAuthApiRef,\n microsoftAuthApiRef,\n oktaAuthApiRef,\n oneloginAuthApiRef,\n useApi,\n type SignInPageProps,\n} from '@backstage/core-plugin-api';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport Typography from '@mui/material/Typography';\n\nimport {\n auth0AuthApiRef,\n oidcAuthApiRef,\n samlAuthApiRef,\n} from '../AuthApiRefs';\nimport { signInTranslationRef } from '../translations/signIn';\n\nconst DEFAULT_PROVIDER = 'github';\n\nconst createProviders = (t: (key: string, params?: any) => string) =>\n new Map<string, SignInProviderConfig | string>([\n [\n 'auth0',\n {\n id: 'auth0-auth-provider',\n title: t('signIn.providers.auth0.title'),\n message: t('signIn.providers.auth0.message'),\n apiRef: auth0AuthApiRef,\n },\n ],\n [\n 'atlassian',\n {\n id: 'atlassian-auth-provider',\n title: t('signIn.providers.atlassian.title'),\n message: t('signIn.providers.atlassian.message'),\n apiRef: atlassianAuthApiRef,\n },\n ],\n [\n 'microsoft',\n {\n id: 'microsoft-auth-provider',\n title: t('signIn.providers.microsoft.title'),\n message: t('signIn.providers.microsoft.message'),\n apiRef: microsoftAuthApiRef,\n },\n ],\n ['azure-easyauth', 'azure-easyauth'],\n [\n 'bitbucket',\n {\n id: 'bitbucket-auth-provider',\n title: t('signIn.providers.bitbucket.title'),\n message: t('signIn.providers.bitbucket.message'),\n apiRef: bitbucketAuthApiRef,\n },\n ],\n [\n 'bitbucketServer',\n {\n id: 'bitbucket-server-auth-provider',\n title: t('signIn.providers.bitbucketServer.title'),\n message: t('signIn.providers.bitbucketServer.message'),\n apiRef: bitbucketServerAuthApiRef,\n },\n ],\n ['cfaccess', 'cfaccess'],\n [\n 'github',\n {\n id: 'github-auth-provider',\n title: t('signIn.providers.github.title'),\n message: t('signIn.providers.github.message'),\n apiRef: githubAuthApiRef,\n },\n ],\n [\n 'gitlab',\n {\n id: 'gitlab-auth-provider',\n title: t('signIn.providers.gitlab.title'),\n message: t('signIn.providers.gitlab.message'),\n apiRef: gitlabAuthApiRef,\n },\n ],\n [\n 'google',\n {\n id: 'google-auth-provider',\n title: t('signIn.providers.google.title'),\n message: t('signIn.providers.google.message'),\n apiRef: googleAuthApiRef,\n },\n ],\n ['gcp-iap', 'gcp-iap'],\n [\n 'oidc',\n {\n id: 'oidc-auth-provider',\n title: t('signIn.providers.oidc.title'),\n message: t('signIn.providers.oidc.message'),\n apiRef: oidcAuthApiRef,\n },\n ],\n [\n 'okta',\n {\n id: 'okta-auth-provider',\n title: t('signIn.providers.okta.title'),\n message: t('signIn.providers.okta.message'),\n apiRef: oktaAuthApiRef,\n },\n ],\n ['oauth2Proxy', 'oauth2Proxy'],\n [\n 'onelogin',\n {\n id: 'onelogin-auth-provider',\n title: t('signIn.providers.onelogin.title'),\n message: t('signIn.providers.onelogin.message'),\n apiRef: oneloginAuthApiRef,\n },\n ],\n [\n 'saml',\n {\n id: 'saml-auth-provider',\n title: t('signIn.providers.saml.title'),\n message: t('signIn.providers.saml.message'),\n apiRef: samlAuthApiRef,\n },\n ],\n ]);\n\n/**\n * RHDH multi-provider sign-in page (mirrors classic app `SignInPage` behavior for NFS).\n *\n * @alpha\n */\nexport function SignInPage(props: SignInPageProps): React.JSX.Element {\n const configApi = useApi(configApiRef);\n const { t } = useTranslationRef(signInTranslationRef);\n const authEnvironment = configApi.getOptionalString('auth.environment');\n if (!authEnvironment?.trim()) {\n return (\n <ErrorPanel\n error={new Error(t('signIn.config.missingAuthEnvironment.error'))}\n title={t('signIn.config.missingAuthEnvironment.panelTitle')}\n >\n <Typography variant=\"body2\" component=\"div\">\n {t('signIn.config.missingAuthEnvironment.description', {\n replace: {\n authEnvKey: <code>auth.environment</code>,\n devEnv: <code>development</code>,\n prodEnv: <code>production</code>,\n },\n })}\n </Typography>\n </ErrorPanel>\n );\n }\n const isDevEnv = authEnvironment === 'development';\n\n const signInPageConfig = configApi.getOptional<string | string[]>(\n 'signInPage',\n );\n const configValue = signInPageConfig ?? DEFAULT_PROVIDER;\n const providerNames = Array.isArray(configValue)\n ? configValue\n : [configValue];\n\n const providers = createProviders(t);\n\n const providerConfigs = providerNames\n .map(name => providers.get(name))\n .filter(\n (config): config is SignInProviderConfig | string => config !== undefined,\n );\n\n if (providerConfigs.length === 0) {\n const defaultProvider = providers.get(DEFAULT_PROVIDER);\n if (defaultProvider) providerConfigs.push(defaultProvider);\n }\n\n if (providerConfigs.some(config => typeof config === 'string')) {\n const proxiedProvider = providerConfigs.find(\n config => typeof config === 'string',\n ) as string;\n return <ProxiedSignInPage {...props} provider={proxiedProvider} />;\n }\n\n const providerList = isDevEnv\n ? ['guest' as const, ...(providerConfigs as SignInProviderConfig[])]\n : (providerConfigs as SignInProviderConfig[]);\n\n return (\n <CCSignInPage\n {...props}\n title={t('signIn.page.title')}\n align=\"center\"\n providers={providerList}\n />\n );\n}\n"],"names":["CCSignInPage"],"mappings":";;;;;;;;AA8CA,MAAM,gBAAA,GAAmB,QAAA;AAEz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gB,KAAA,CAAM,OAAA,CAAQ,WAAW,CAAA,GAC3C,WAAA,GACA,CAAC,WAAW,CAAA;AAEhB,EAAA,MAAM,SAAA,GAAY,gBAAgB,CAAC,CAAA;AAEnC,EAAA,MAAM,eAAA,GAAkB,cACrB,GAAA,CAAI,CAAA,IAAA,KAAQ,UAAU,GAAA,CAAI,IAAI,CAAC,CAAA,CAC/B,MAAA;AAAA,IACC,CAAC,WAAoD,MAAA,KAAW;AAAA,GAClE;AAEF,EAAA,IAAI,eAAA,CAAgB,WAAW,CAAA,EAAG;AAChC,IAAA,MAAM,eAAA,GAAkB,SAAA,CAAU,GAAA,CAAI,gBAAgB,CAAA;AACtD,IAAA,IAAI,eAAA,EAAiB,eAAA,CAAgB,IAAA,CAAK,eAAe,CAAA;AAAA,EAC3D;AAEA,EAAA,IAAI,gBAAgB,IAAA,CAAK,CAAA,MAAA,KAAU,OAAO,MAAA,KAAW,QAAQ,CAAA,EAAG;AAC9D,IAAA,MAAM,kBAAkB,eAAA,CAAgB,IAAA;AAAA,MACtC,CAAA,MAAA,KAAU,OAAO,MAAA,KAAW;AAAA,KAC9B;AACA,IAAA,uBAAO,GAAA,CAAC,iBAAA,EAAA,EAAmB,GAAG,KAAA,EAAO,UAAU,eAAA,EAAiB,CAAA;AAAA,EAClE;AAEA,EAAA,MAAM,eAAe,QAAA,GACjB,CAAC,OAAA,EAAkB,GAAI,eAA0C,CAAA,GAChE,eAAA;AAEL,EAAA,uBACE,GAAA;AAAA,IAACA,YAAA;AAAA,IAAA;AAAA,MACE,GAAG,KAAA;AAAA,MACJ,KAAA,EAAO,EAAE,mBAAmB,CAAA;AAAA,MAC5B,KAAA,EAAM,QAAA;AAAA,MACN,SAAA,EAAW;AAAA;AAAA,GACb;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"SignInPage.esm.js","sources":["../../src/components/SignInPage.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n ErrorPanel,\n SignInPage as CCSignInPage,\n ProxiedSignInPage,\n type SignInProviderConfig,\n} from '@backstage/core-components';\nimport {\n atlassianAuthApiRef,\n bitbucketAuthApiRef,\n bitbucketServerAuthApiRef,\n configApiRef,\n githubAuthApiRef,\n gitlabAuthApiRef,\n googleAuthApiRef,\n microsoftAuthApiRef,\n oktaAuthApiRef,\n oneloginAuthApiRef,\n useApi,\n type SignInPageProps,\n} from '@backstage/core-plugin-api';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport Typography from '@mui/material/Typography';\n\nimport {\n auth0AuthApiRef,\n keycloakAuthApiRef,\n oidcAuthApiRef,\n pingfederateAuthApiRef,\n samlAuthApiRef,\n} from '../AuthApiRefs';\nimport { signInTranslationRef } from '../translations/signIn';\n\nconst DEFAULT_PROVIDER = 'github';\n\nconst createProviders = (t: (key: string, params?: any) => string) =>\n new Map<string, SignInProviderConfig | string>([\n [\n 'auth0',\n {\n id: 'auth0-auth-provider',\n title: t('signIn.providers.auth0.title'),\n message: t('signIn.providers.auth0.message'),\n apiRef: auth0AuthApiRef,\n },\n ],\n [\n 'atlassian',\n {\n id: 'atlassian-auth-provider',\n title: t('signIn.providers.atlassian.title'),\n message: t('signIn.providers.atlassian.message'),\n apiRef: atlassianAuthApiRef,\n },\n ],\n [\n 'microsoft',\n {\n id: 'microsoft-auth-provider',\n title: t('signIn.providers.microsoft.title'),\n message: t('signIn.providers.microsoft.message'),\n apiRef: microsoftAuthApiRef,\n },\n ],\n ['azure-easyauth', 'azure-easyauth'],\n [\n 'bitbucket',\n {\n id: 'bitbucket-auth-provider',\n title: t('signIn.providers.bitbucket.title'),\n message: t('signIn.providers.bitbucket.message'),\n apiRef: bitbucketAuthApiRef,\n },\n ],\n [\n 'bitbucketServer',\n {\n id: 'bitbucket-server-auth-provider',\n title: t('signIn.providers.bitbucketServer.title'),\n message: t('signIn.providers.bitbucketServer.message'),\n apiRef: bitbucketServerAuthApiRef,\n },\n ],\n ['cfaccess', 'cfaccess'],\n [\n 'github',\n {\n id: 'github-auth-provider',\n title: t('signIn.providers.github.title'),\n message: t('signIn.providers.github.message'),\n apiRef: githubAuthApiRef,\n },\n ],\n [\n 'gitlab',\n {\n id: 'gitlab-auth-provider',\n title: t('signIn.providers.gitlab.title'),\n message: t('signIn.providers.gitlab.message'),\n apiRef: gitlabAuthApiRef,\n },\n ],\n [\n 'google',\n {\n id: 'google-auth-provider',\n title: t('signIn.providers.google.title'),\n message: t('signIn.providers.google.message'),\n apiRef: googleAuthApiRef,\n },\n ],\n ['gcp-iap', 'gcp-iap'],\n [\n 'oidc',\n {\n id: 'oidc-auth-provider',\n title: t('signIn.providers.oidc.title'),\n message: t('signIn.providers.oidc.message'),\n apiRef: oidcAuthApiRef,\n },\n ],\n [\n 'keycloak',\n {\n id: 'keycloak-auth-provider',\n title: t('signIn.providers.keycloak.title'),\n message: t('signIn.providers.keycloak.message'),\n apiRef: keycloakAuthApiRef,\n },\n ],\n [\n 'pingfederate',\n {\n id: 'pingfederate-auth-provider',\n title: t('signIn.providers.pingfederate.title'),\n message: t('signIn.providers.pingfederate.message'),\n apiRef: pingfederateAuthApiRef,\n },\n ],\n [\n 'okta',\n {\n id: 'okta-auth-provider',\n title: t('signIn.providers.okta.title'),\n message: t('signIn.providers.okta.message'),\n apiRef: oktaAuthApiRef,\n },\n ],\n ['oauth2Proxy', 'oauth2Proxy'],\n [\n 'onelogin',\n {\n id: 'onelogin-auth-provider',\n title: t('signIn.providers.onelogin.title'),\n message: t('signIn.providers.onelogin.message'),\n apiRef: oneloginAuthApiRef,\n },\n ],\n [\n 'saml',\n {\n id: 'saml-auth-provider',\n title: t('signIn.providers.saml.title'),\n message: t('signIn.providers.saml.message'),\n apiRef: samlAuthApiRef,\n },\n ],\n ]);\n\n/**\n * RHDH multi-provider sign-in page (mirrors classic app `SignInPage` behavior for NFS).\n *\n * @alpha\n */\nexport function SignInPage(props: SignInPageProps): React.JSX.Element {\n const configApi = useApi(configApiRef);\n const { t } = useTranslationRef(signInTranslationRef);\n const authEnvironment = configApi.getOptionalString('auth.environment');\n if (!authEnvironment?.trim()) {\n return (\n <ErrorPanel\n error={new Error(t('signIn.config.missingAuthEnvironment.error'))}\n title={t('signIn.config.missingAuthEnvironment.panelTitle')}\n >\n <Typography variant=\"body2\" component=\"div\">\n {t('signIn.config.missingAuthEnvironment.description', {\n replace: {\n authEnvKey: <code>auth.environment</code>,\n devEnv: <code>development</code>,\n prodEnv: <code>production</code>,\n },\n })}\n </Typography>\n </ErrorPanel>\n );\n }\n const isDevEnv = authEnvironment === 'development';\n\n const signInPageConfig = configApi.getOptional<string | string[]>(\n 'signInPage',\n );\n const configValue = signInPageConfig ?? DEFAULT_PROVIDER;\n const providerNames = Array.isArray(configValue)\n ? configValue\n : [configValue];\n\n const providers = createProviders(t);\n\n const providerConfigs = providerNames\n .map(name => providers.get(name))\n .filter(\n (config): config is SignInProviderConfig | string => config !== undefined,\n );\n\n if (providerConfigs.length === 0) {\n const defaultProvider = providers.get(DEFAULT_PROVIDER);\n if (defaultProvider) providerConfigs.push(defaultProvider);\n }\n\n if (providerConfigs.some(config => typeof config === 'string')) {\n const proxiedProvider = providerConfigs.find(\n config => typeof config === 'string',\n ) as string;\n return <ProxiedSignInPage {...props} provider={proxiedProvider} />;\n }\n\n const providerList = isDevEnv\n ? ['guest' as const, ...(providerConfigs as SignInProviderConfig[])]\n : (providerConfigs as SignInProviderConfig[]);\n\n return (\n <CCSignInPage\n {...props}\n title={t('signIn.page.title')}\n align=\"center\"\n providers={providerList}\n />\n );\n}\n"],"names":["CCSignInPage"],"mappings":";;;;;;;;A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AAA,EAClE;AAEA,EAAA,MAAM,eAAe,QAAA,GACjB,CAAC,OAAA,EAAkB,GAAI,eAA0C,CAAA,GAChE,eAAA;AAEL,EAAA,uBACE,GAAA;AAAA,IAACA,YAAA;AAAA,IAAA;AAAA,MACE,GAAG,KAAA;AAAA,MACJ,KAAA,EAAO,EAAE,mBAAmB,CAAA;AAAA,MAC5B,KAAA,EAAM,QAAA;AAAA,MACN,SAAA,EAAW;AAAA;AAAA,GACb;AAEJ;;;;"}
|
|
@@ -51,6 +51,14 @@ const signInTranslationRef = createTranslationRef({
|
|
|
51
51
|
title: "OIDC",
|
|
52
52
|
message: "Sign in using OIDC"
|
|
53
53
|
},
|
|
54
|
+
keycloak: {
|
|
55
|
+
title: "Keycloak",
|
|
56
|
+
message: "Sign in using Keycloak"
|
|
57
|
+
},
|
|
58
|
+
pingfederate: {
|
|
59
|
+
title: "PingFederate",
|
|
60
|
+
message: "Sign in using PingFederate"
|
|
61
|
+
},
|
|
54
62
|
okta: {
|
|
55
63
|
title: "Okta",
|
|
56
64
|
message: "Sign in using Okta"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signIn.esm.js","sources":["../../src/translations/signIn.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/**\n * Sign-in page messages (English). Same key shape as legacy RHDH app signIn for compatibility.\n *\n * @alpha\n */\nexport const signInTranslationRef = createTranslationRef({\n id: 'plugin.app-auth.sign-in',\n messages: {\n signIn: {\n page: {\n title: 'Select a sign-in method',\n },\n config: {\n missingAuthEnvironment: {\n error:\n 'Missing required app configuration: auth.environment must be set',\n panelTitle: 'Sign-in is not available',\n description:\n 'Set {{ authEnvKey }} in your app configuration (for example {{ devEnv }} for local use or {{ prodEnv }} in deployed environments). Without it, the app cannot safely determine which sign-in options to offer.',\n },\n },\n providers: {\n auth0: {\n title: 'Auth0',\n message: 'Sign in using Auth0',\n },\n atlassian: {\n title: 'Atlassian',\n message: 'Sign in using Atlassian',\n },\n microsoft: {\n title: 'Microsoft',\n message: 'Sign in using Microsoft',\n },\n bitbucket: {\n title: 'Bitbucket',\n message: 'Sign in using Bitbucket',\n },\n bitbucketServer: {\n title: 'Bitbucket Server',\n message: 'Sign in using Bitbucket Server',\n },\n github: {\n title: 'GitHub',\n message: 'Sign in using GitHub',\n },\n gitlab: {\n title: 'GitLab',\n message: 'Sign in using GitLab',\n },\n google: {\n title: 'Google',\n message: 'Sign in using Google',\n },\n oidc: {\n title: 'OIDC',\n message: 'Sign in using OIDC',\n },\n okta: {\n title: 'Okta',\n message: 'Sign in using Okta',\n },\n onelogin: {\n title: 'OneLogin',\n message: 'Sign in using OneLogin',\n },\n saml: {\n title: 'SAML',\n message: 'Sign in using SAML',\n },\n },\n },\n },\n});\n"],"names":[],"mappings":";;AAuBO,MAAM,uBAAuB,oBAAA,CAAqB;AAAA,EACvD,EAAA,EAAI,yBAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,MAAA,EAAQ;AAAA,MACN,IAAA,EAAM;AAAA,QACJ,KAAA,EAAO;AAAA,OACT;AAAA,MACA,MAAA,EAAQ;AAAA,QACN,sBAAA,EAAwB;AAAA,UACtB,KAAA,EACE,kEAAA;AAAA,UACF,UAAA,EAAY,0BAAA;AAAA,UACZ,WAAA,EACE;AAAA;AACJ,OACF;AAAA,MACA,SAAA,EAAW;AAAA,QACT,KAAA,EAAO;AAAA,UACL,KAAA,EAAO,OAAA;AAAA,UACP,OAAA,EAAS;AAAA,SACX;AAAA,QACA,SAAA,EAAW;AAAA,UACT,KAAA,EAAO,WAAA;AAAA,UACP,OAAA,EAAS;AAAA,SACX;AAAA,QACA,SAAA,EAAW;AAAA,UACT,KAAA,EAAO,WAAA;AAAA,UACP,OAAA,EAAS;AAAA,SACX;AAAA,QACA,SAAA,EAAW;AAAA,UACT,KAAA,EAAO,WAAA;AAAA,UACP,OAAA,EAAS;AAAA,SACX;AAAA,QACA,eAAA,EAAiB;AAAA,UACf,KAAA,EAAO,kBAAA;AAAA,UACP,OAAA,EAAS;AAAA,SACX;AAAA,QACA,MAAA,EAAQ;AAAA,UACN,KAAA,EAAO,QAAA;AAAA,UACP,OAAA,EAAS;AAAA,SACX;AAAA,QACA,MAAA,EAAQ;AAAA,UACN,KAAA,EAAO,QAAA;AAAA,UACP,OAAA,EAAS;AAAA,SACX;AAAA,QACA,MAAA,EAAQ;AAAA,UACN,KAAA,EAAO,QAAA;AAAA,UACP,OAAA,EAAS;AAAA,SACX;AAAA,QACA,IAAA,EAAM;AAAA,UACJ,KAAA,EAAO,MAAA;AAAA,UACP,OAAA,EAAS;AAAA,SACX;AAAA,QACA,IAAA,EAAM;AAAA,UACJ,KAAA,EAAO,MAAA;AAAA,UACP,OAAA,EAAS;AAAA,SACX;AAAA,QACA,QAAA,EAAU;AAAA,UACR,KAAA,EAAO,UAAA;AAAA,UACP,OAAA,EAAS;AAAA,SACX;AAAA,QACA,IAAA,EAAM;AAAA,UACJ,KAAA,EAAO,MAAA;AAAA,UACP,OAAA,EAAS;AAAA;AACX;AACF;AACF;AAEJ,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"signIn.esm.js","sources":["../../src/translations/signIn.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/**\n * Sign-in page messages (English). Same key shape as legacy RHDH app signIn for compatibility.\n *\n * @alpha\n */\nexport const signInTranslationRef = createTranslationRef({\n id: 'plugin.app-auth.sign-in',\n messages: {\n signIn: {\n page: {\n title: 'Select a sign-in method',\n },\n config: {\n missingAuthEnvironment: {\n error:\n 'Missing required app configuration: auth.environment must be set',\n panelTitle: 'Sign-in is not available',\n description:\n 'Set {{ authEnvKey }} in your app configuration (for example {{ devEnv }} for local use or {{ prodEnv }} in deployed environments). Without it, the app cannot safely determine which sign-in options to offer.',\n },\n },\n providers: {\n auth0: {\n title: 'Auth0',\n message: 'Sign in using Auth0',\n },\n atlassian: {\n title: 'Atlassian',\n message: 'Sign in using Atlassian',\n },\n microsoft: {\n title: 'Microsoft',\n message: 'Sign in using Microsoft',\n },\n bitbucket: {\n title: 'Bitbucket',\n message: 'Sign in using Bitbucket',\n },\n bitbucketServer: {\n title: 'Bitbucket Server',\n message: 'Sign in using Bitbucket Server',\n },\n github: {\n title: 'GitHub',\n message: 'Sign in using GitHub',\n },\n gitlab: {\n title: 'GitLab',\n message: 'Sign in using GitLab',\n },\n google: {\n title: 'Google',\n message: 'Sign in using Google',\n },\n oidc: {\n title: 'OIDC',\n message: 'Sign in using OIDC',\n },\n keycloak: {\n title: 'Keycloak',\n message: 'Sign in using Keycloak',\n },\n pingfederate: {\n title: 'PingFederate',\n message: 'Sign in using PingFederate',\n },\n okta: {\n title: 'Okta',\n message: 'Sign in using Okta',\n },\n onelogin: {\n title: 'OneLogin',\n message: 'Sign in using OneLogin',\n },\n saml: {\n title: 'SAML',\n message: 'Sign in using SAML',\n },\n },\n },\n },\n});\n"],"names":[],"mappings":";;AAuBO,MAAM,uBAAuB,oBAAA,CAAqB;AAAA,EACvD,EAAA,EAAI,yBAAA;AAAA,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AAA,EAAM;AAAA,UACJ,KAAA,EAAO,MAAA;AAAA,UACP,OAAA,EAAS;AAAA,SACX;AAAA,QACA,QAAA,EAAU;AAAA,UACR,KAAA,EAAO,UAAA;AAAA,UACP,OAAA,EAAS;AAAA,SACX;AAAA,QACA,IAAA,EAAM;AAAA,UACJ,KAAA,EAAO,MAAA;AAAA,UACP,OAAA,EAAS;AAAA;AACX;AACF;AACF;AAEJ,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@red-hat-developer-hub/backstage-plugin-app-auth",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "RHDH sign-in page and OIDC/Auth0/SAML frontend auth APIs for the new frontend system",
|
|
6
6
|
"main": "./dist/index.esm.js",
|