@backstage/core-plugin-api 1.10.8 → 1.10.9
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 +15 -0
- package/dist/apis/definitions/auth.esm.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @backstage/core-plugin-api
|
|
2
2
|
|
|
3
|
+
## 1.10.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f6ffea6: Add optional message field for auth providers. This is intended to be a user friendly message that displays in the OAuth request dialog. A default message will be displayed if one is not provided.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/config@1.3.3
|
|
10
|
+
|
|
11
|
+
## 1.10.9-next.0
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
- @backstage/config@1.3.3-next.0
|
|
17
|
+
|
|
3
18
|
## 1.10.8
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.esm.js","sources":["../../../src/apis/definitions/auth.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\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 { ApiRef, createApiRef } from '../system';\nimport { IconComponent } from '../../icons/types';\nimport { Observable } from '@backstage/types';\n\n/**\n * This file contains declarations for common interfaces of auth-related APIs.\n * The declarations should be used to signal which type of authentication and\n * authorization methods each separate auth provider supports.\n *\n * For example, a Google OAuth provider that supports OAuth 2 and OpenID Connect,\n * would be declared as follows:\n *\n * const googleAuthApiRef = createApiRef<OAuthApi & OpenIDConnectApi>({ ... })\n */\n\n/**\n * Information about the auth provider.\n *\n * @remarks\n *\n * This information is used both to connect the correct auth provider in the backend, as\n * well as displaying the provider to the user.\n *\n * @public\n */\nexport type AuthProviderInfo = {\n /**\n * The ID of the auth provider. This should match with ID of the provider in the `@backstage/auth-backend`.\n */\n id: string;\n\n /**\n * Title for the auth provider, for example \"GitHub\"\n */\n title: string;\n\n /**\n * Icon for the auth provider.\n */\n icon: IconComponent;\n};\n\n/**\n * An array of scopes, or a scope string formatted according to the\n * auth provider, which is typically a space separated list.\n *\n * @remarks\n *\n * See the documentation for each auth provider for the list of scopes\n * supported by each provider.\n *\n * @public\n */\nexport type OAuthScope = string | string[];\n\n/**\n * Configuration of an authentication request.\n *\n * @public\n */\nexport type AuthRequestOptions = {\n /**\n * If this is set to true, the user will not be prompted to log in,\n * and an empty response will be returned if there is no existing session.\n *\n * This can be used to perform a check whether the user is logged in, or if you don't\n * want to force a user to be logged in, but provide functionality if they already are.\n *\n * @defaultValue false\n */\n optional?: boolean;\n\n /**\n * If this is set to true, the request will bypass the regular oauth login modal\n * and open the login popup directly.\n *\n * The method must be called synchronously from a user action for this to work in all browsers.\n *\n * @defaultValue false\n */\n instantPopup?: boolean;\n};\n\n/**\n * This API provides access to OAuth 2 credentials. It lets you request access tokens,\n * which can be used to act on behalf of the user when talking to APIs.\n *\n * @public\n */\nexport type OAuthApi = {\n /**\n * Requests an OAuth 2 Access Token, optionally with a set of scopes. The access token allows\n * you to make requests on behalf of the user, and the copes may grant you broader access, depending\n * on the auth provider.\n *\n * Each auth provider has separate handling of scope, so you need to look at the documentation\n * for each one to know what scope you need to request.\n *\n * This method is cheap and should be called each time an access token is used. Do not for example\n * store the access token in React component state, as that could cause the token to expire. Instead\n * fetch a new access token for each request.\n *\n * Be sure to include all required scopes when requesting an access token. When testing your implementation\n * it is best to log out the Backstage session and then visit your plugin page directly, as\n * you might already have some required scopes in your existing session. Not requesting the correct\n * scopes can lead to 403 or other authorization errors, which can be tricky to debug.\n *\n * If the user has not yet granted access to the provider and the set of requested scopes, the user\n * will be prompted to log in. The returned promise will not resolve until the user has\n * successfully logged in. The returned promise can be rejected, but only if the user rejects the login request.\n */\n getAccessToken(\n scope?: OAuthScope,\n options?: AuthRequestOptions,\n ): Promise<string>;\n};\n\n/**\n * This API provides access to OpenID Connect credentials. It lets you request ID tokens,\n * which can be passed to backend services to prove the user's identity.\n *\n * @public\n */\nexport type OpenIdConnectApi = {\n /**\n * Requests an OpenID Connect ID Token.\n *\n * This method is cheap and should be called each time an ID token is used. Do not for example\n * store the id token in React component state, as that could cause the token to expire. Instead\n * fetch a new id token for each request.\n *\n * If the user has not yet logged in to Google inside Backstage, the user will be prompted\n * to log in. The returned promise will not resolve until the user has successfully logged in.\n * The returned promise can be rejected, but only if the user rejects the login request.\n */\n getIdToken(options?: AuthRequestOptions): Promise<string>;\n};\n\n/**\n * This API provides access to profile information of the user from an auth provider.\n *\n * @public\n */\nexport type ProfileInfoApi = {\n /**\n * Get profile information for the user as supplied by this auth provider.\n *\n * If the optional flag is not set, a session is guaranteed to be returned, while if\n * the optional flag is set, the session may be undefined. See {@link AuthRequestOptions} for more details.\n */\n getProfile(options?: AuthRequestOptions): Promise<ProfileInfo | undefined>;\n};\n\n/**\n * This API provides access to the user's identity within Backstage.\n *\n * @remarks\n *\n * An auth provider that implements this interface can be used to sign-in to backstage. It is\n * not intended to be used directly from a plugin, but instead serves as a connection between\n * this authentication method and the app's {@link IdentityApi}\n *\n * @public\n */\nexport type BackstageIdentityApi = {\n /**\n * Get the user's identity within Backstage. This should normally not be called directly,\n * use the {@link IdentityApi} instead.\n *\n * If the optional flag is not set, a session is guaranteed to be returned, while if\n * the optional flag is set, the session may be undefined. See {@link AuthRequestOptions} for more details.\n */\n getBackstageIdentity(\n options?: AuthRequestOptions,\n ): Promise<BackstageIdentityResponse | undefined>;\n};\n\n/**\n * User identity information within Backstage.\n *\n * @public\n */\nexport type BackstageUserIdentity = {\n /**\n * The type of identity that this structure represents. In the frontend app\n * this will currently always be 'user'.\n */\n type: 'user';\n\n /**\n * The entityRef of the user in the catalog.\n * For example User:default/sandra\n */\n userEntityRef: string;\n\n /**\n * The user and group entities that the user claims ownership through\n */\n ownershipEntityRefs: string[];\n};\n\n/**\n * Token and Identity response, with the users claims in the Identity.\n *\n * @public\n */\nexport type BackstageIdentityResponse = {\n /**\n * The token used to authenticate the user within Backstage.\n */\n token: string;\n\n /**\n * The time at which the token expires. If not set, it can be assumed that the token does not expire.\n */\n expiresAt?: Date;\n\n /**\n * Identity information derived from the token.\n */\n identity: BackstageUserIdentity;\n};\n\n/**\n * Profile information of the user.\n *\n * @public\n */\nexport type ProfileInfo = {\n /**\n * Email ID.\n */\n email?: string;\n\n /**\n * Display name that can be presented to the user.\n */\n displayName?: string;\n\n /**\n * URL to an avatar image of the user.\n */\n picture?: string;\n};\n\n/**\n * Session state values passed to subscribers of the SessionApi.\n *\n * @public\n */\nexport enum SessionState {\n /**\n * User signed in.\n */\n SignedIn = 'SignedIn',\n /**\n * User not signed in.\n */\n SignedOut = 'SignedOut',\n}\n\n/**\n * The SessionApi provides basic controls for any auth provider that is tied to a persistent session.\n *\n * @public\n */\nexport type SessionApi = {\n /**\n * Sign in with a minimum set of permissions.\n */\n signIn(): Promise<void>;\n\n /**\n * Sign out from the current session. This will reload the page.\n */\n signOut(): Promise<void>;\n\n /**\n * Observe the current state of the auth session. Emits the current state on subscription.\n */\n sessionState$(): Observable<SessionState>;\n};\n\n/**\n * Provides authentication towards Google APIs and identities.\n *\n * @public\n * @remarks\n *\n * See {@link https://developers.google.com/identity/protocols/googlescopes} for a full list of supported scopes.\n *\n * Note that the ID token payload is only guaranteed to contain the user's numerical Google ID,\n * email and expiration information. Do not rely on any other fields, as they might not be present.\n */\nexport const googleAuthApiRef: ApiRef<\n OAuthApi &\n OpenIdConnectApi &\n ProfileInfoApi &\n BackstageIdentityApi &\n SessionApi\n> = createApiRef({\n id: 'core.auth.google',\n});\n\n/**\n * Provides authentication towards GitHub APIs.\n *\n * @public\n * @remarks\n *\n * See {@link https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/}\n * for a full list of supported scopes.\n */\nexport const githubAuthApiRef: ApiRef<\n OAuthApi & ProfileInfoApi & BackstageIdentityApi & SessionApi\n> = createApiRef({\n id: 'core.auth.github',\n});\n\n/**\n * Provides authentication towards Okta APIs.\n *\n * @public\n * @remarks\n *\n * See {@link https://developer.okta.com/docs/guides/implement-oauth-for-okta/scopes/}\n * for a full list of supported scopes.\n */\nexport const oktaAuthApiRef: ApiRef<\n OAuthApi &\n OpenIdConnectApi &\n ProfileInfoApi &\n BackstageIdentityApi &\n SessionApi\n> = createApiRef({\n id: 'core.auth.okta',\n});\n\n/**\n * Provides authentication towards GitLab APIs.\n *\n * @public\n * @remarks\n *\n * See {@link https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#limiting-scopes-of-a-personal-access-token}\n * for a full list of supported scopes.\n */\nexport const gitlabAuthApiRef: ApiRef<\n OAuthApi &\n OpenIdConnectApi &\n ProfileInfoApi &\n BackstageIdentityApi &\n SessionApi\n> = createApiRef({\n id: 'core.auth.gitlab',\n});\n\n/**\n * Provides authentication towards Microsoft APIs and identities.\n *\n * @public\n * @remarks\n *\n * For more info and a full list of supported scopes, see:\n * - {@link https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-permissions-and-consent}\n * - {@link https://docs.microsoft.com/en-us/graph/permissions-reference}\n */\nexport const microsoftAuthApiRef: ApiRef<\n OAuthApi &\n OpenIdConnectApi &\n ProfileInfoApi &\n BackstageIdentityApi &\n SessionApi\n> = createApiRef({\n id: 'core.auth.microsoft',\n});\n\n/**\n * Provides authentication towards OneLogin APIs.\n *\n * @public\n */\nexport const oneloginAuthApiRef: ApiRef<\n OAuthApi &\n OpenIdConnectApi &\n ProfileInfoApi &\n BackstageIdentityApi &\n SessionApi\n> = createApiRef({\n id: 'core.auth.onelogin',\n});\n\n/**\n * Provides authentication towards Bitbucket APIs.\n *\n * @public\n * @remarks\n *\n * See {@link https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/}\n * for a full list of supported scopes.\n */\nexport const bitbucketAuthApiRef: ApiRef<\n OAuthApi & ProfileInfoApi & BackstageIdentityApi & SessionApi\n> = createApiRef({\n id: 'core.auth.bitbucket',\n});\n\n/**\n * Provides authentication towards Bitbucket Server APIs.\n *\n * @public\n * @remarks\n *\n * See {@link https://confluence.atlassian.com/bitbucketserver/bitbucket-oauth-2-0-provider-api-1108483661.html#BitbucketOAuth2.0providerAPI-scopes}\n * for a full list of supported scopes.\n */\nexport const bitbucketServerAuthApiRef: ApiRef<\n OAuthApi & ProfileInfoApi & BackstageIdentityApi & SessionApi\n> = createApiRef({\n id: 'core.auth.bitbucket-server',\n});\n\n/**\n * Provides authentication towards Atlassian APIs.\n *\n * @public\n * @remarks\n *\n * See {@link https://developer.atlassian.com/cloud/jira/platform/scopes-for-connect-and-oauth-2-3LO-apps/}\n * for a full list of supported scopes.\n */\nexport const atlassianAuthApiRef: ApiRef<\n OAuthApi & ProfileInfoApi & BackstageIdentityApi & SessionApi\n> = createApiRef({\n id: 'core.auth.atlassian',\n});\n\n/**\n * Provides authentication towards VMware Cloud APIs and identities.\n *\n * @public\n * @remarks\n *\n * For more info about VMware Cloud identity and access management:\n * - {@link https://docs.vmware.com/en/VMware-Cloud-services/services/Using-VMware-Cloud-Services/GUID-53D39337-D93A-4B84-BD18-DDF43C21479A.html}\n */\nexport const vmwareCloudAuthApiRef: ApiRef<\n OAuthApi &\n OpenIdConnectApi &\n ProfileInfoApi &\n BackstageIdentityApi &\n SessionApi\n> = createApiRef({\n id: 'core.auth.vmware-cloud',\n});\n"],"names":["SessionState"],"mappings":";;;;;AA0QY,IAAA,YAAA,qBAAAA,aAAL,KAAA;AAIL,EAAAA,cAAA,UAAW,CAAA,GAAA,UAAA;AAIX,EAAAA,cAAA,WAAY,CAAA,GAAA,WAAA;AARF,EAAAA,OAAAA,aAAAA;AAAA,CAAA,EAAA,YAAA,IAAA,EAAA;AA4CL,MAAM,mBAMT,YAAa,CAAA;AAAA,EACf,EAAI,EAAA;AACN,CAAC;AAWM,MAAM,mBAET,YAAa,CAAA;AAAA,EACf,EAAI,EAAA;AACN,CAAC;AAWM,MAAM,iBAMT,YAAa,CAAA;AAAA,EACf,EAAI,EAAA;AACN,CAAC;AAWM,MAAM,mBAMT,YAAa,CAAA;AAAA,EACf,EAAI,EAAA;AACN,CAAC;AAYM,MAAM,sBAMT,YAAa,CAAA;AAAA,EACf,EAAI,EAAA;AACN,CAAC;AAOM,MAAM,qBAMT,YAAa,CAAA;AAAA,EACf,EAAI,EAAA;AACN,CAAC;AAWM,MAAM,sBAET,YAAa,CAAA;AAAA,EACf,EAAI,EAAA;AACN,CAAC;AAWM,MAAM,4BAET,YAAa,CAAA;AAAA,EACf,EAAI,EAAA;AACN,CAAC;AAWM,MAAM,sBAET,YAAa,CAAA;AAAA,EACf,EAAI,EAAA;AACN,CAAC;AAWM,MAAM,wBAMT,YAAa,CAAA;AAAA,EACf,EAAI,EAAA;AACN,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"auth.esm.js","sources":["../../../src/apis/definitions/auth.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\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 { ApiRef, createApiRef } from '../system';\nimport { IconComponent } from '../../icons/types';\nimport { Observable } from '@backstage/types';\n\n/**\n * This file contains declarations for common interfaces of auth-related APIs.\n * The declarations should be used to signal which type of authentication and\n * authorization methods each separate auth provider supports.\n *\n * For example, a Google OAuth provider that supports OAuth 2 and OpenID Connect,\n * would be declared as follows:\n *\n * const googleAuthApiRef = createApiRef<OAuthApi & OpenIDConnectApi>({ ... })\n */\n\n/**\n * Information about the auth provider.\n *\n * @remarks\n *\n * This information is used both to connect the correct auth provider in the backend, as\n * well as displaying the provider to the user.\n *\n * @public\n */\nexport type AuthProviderInfo = {\n /**\n * The ID of the auth provider. This should match with ID of the provider in the `@backstage/auth-backend`.\n */\n id: string;\n\n /**\n * Title for the auth provider, for example \"GitHub\"\n */\n title: string;\n\n /**\n * Icon for the auth provider.\n */\n icon: IconComponent;\n\n /**\n * Optional user friendly messaage to display for the auth provider.\n */\n message?: string;\n};\n\n/**\n * An array of scopes, or a scope string formatted according to the\n * auth provider, which is typically a space separated list.\n *\n * @remarks\n *\n * See the documentation for each auth provider for the list of scopes\n * supported by each provider.\n *\n * @public\n */\nexport type OAuthScope = string | string[];\n\n/**\n * Configuration of an authentication request.\n *\n * @public\n */\nexport type AuthRequestOptions = {\n /**\n * If this is set to true, the user will not be prompted to log in,\n * and an empty response will be returned if there is no existing session.\n *\n * This can be used to perform a check whether the user is logged in, or if you don't\n * want to force a user to be logged in, but provide functionality if they already are.\n *\n * @defaultValue false\n */\n optional?: boolean;\n\n /**\n * If this is set to true, the request will bypass the regular oauth login modal\n * and open the login popup directly.\n *\n * The method must be called synchronously from a user action for this to work in all browsers.\n *\n * @defaultValue false\n */\n instantPopup?: boolean;\n};\n\n/**\n * This API provides access to OAuth 2 credentials. It lets you request access tokens,\n * which can be used to act on behalf of the user when talking to APIs.\n *\n * @public\n */\nexport type OAuthApi = {\n /**\n * Requests an OAuth 2 Access Token, optionally with a set of scopes. The access token allows\n * you to make requests on behalf of the user, and the copes may grant you broader access, depending\n * on the auth provider.\n *\n * Each auth provider has separate handling of scope, so you need to look at the documentation\n * for each one to know what scope you need to request.\n *\n * This method is cheap and should be called each time an access token is used. Do not for example\n * store the access token in React component state, as that could cause the token to expire. Instead\n * fetch a new access token for each request.\n *\n * Be sure to include all required scopes when requesting an access token. When testing your implementation\n * it is best to log out the Backstage session and then visit your plugin page directly, as\n * you might already have some required scopes in your existing session. Not requesting the correct\n * scopes can lead to 403 or other authorization errors, which can be tricky to debug.\n *\n * If the user has not yet granted access to the provider and the set of requested scopes, the user\n * will be prompted to log in. The returned promise will not resolve until the user has\n * successfully logged in. The returned promise can be rejected, but only if the user rejects the login request.\n */\n getAccessToken(\n scope?: OAuthScope,\n options?: AuthRequestOptions,\n ): Promise<string>;\n};\n\n/**\n * This API provides access to OpenID Connect credentials. It lets you request ID tokens,\n * which can be passed to backend services to prove the user's identity.\n *\n * @public\n */\nexport type OpenIdConnectApi = {\n /**\n * Requests an OpenID Connect ID Token.\n *\n * This method is cheap and should be called each time an ID token is used. Do not for example\n * store the id token in React component state, as that could cause the token to expire. Instead\n * fetch a new id token for each request.\n *\n * If the user has not yet logged in to Google inside Backstage, the user will be prompted\n * to log in. The returned promise will not resolve until the user has successfully logged in.\n * The returned promise can be rejected, but only if the user rejects the login request.\n */\n getIdToken(options?: AuthRequestOptions): Promise<string>;\n};\n\n/**\n * This API provides access to profile information of the user from an auth provider.\n *\n * @public\n */\nexport type ProfileInfoApi = {\n /**\n * Get profile information for the user as supplied by this auth provider.\n *\n * If the optional flag is not set, a session is guaranteed to be returned, while if\n * the optional flag is set, the session may be undefined. See {@link AuthRequestOptions} for more details.\n */\n getProfile(options?: AuthRequestOptions): Promise<ProfileInfo | undefined>;\n};\n\n/**\n * This API provides access to the user's identity within Backstage.\n *\n * @remarks\n *\n * An auth provider that implements this interface can be used to sign-in to backstage. It is\n * not intended to be used directly from a plugin, but instead serves as a connection between\n * this authentication method and the app's {@link IdentityApi}\n *\n * @public\n */\nexport type BackstageIdentityApi = {\n /**\n * Get the user's identity within Backstage. This should normally not be called directly,\n * use the {@link IdentityApi} instead.\n *\n * If the optional flag is not set, a session is guaranteed to be returned, while if\n * the optional flag is set, the session may be undefined. See {@link AuthRequestOptions} for more details.\n */\n getBackstageIdentity(\n options?: AuthRequestOptions,\n ): Promise<BackstageIdentityResponse | undefined>;\n};\n\n/**\n * User identity information within Backstage.\n *\n * @public\n */\nexport type BackstageUserIdentity = {\n /**\n * The type of identity that this structure represents. In the frontend app\n * this will currently always be 'user'.\n */\n type: 'user';\n\n /**\n * The entityRef of the user in the catalog.\n * For example User:default/sandra\n */\n userEntityRef: string;\n\n /**\n * The user and group entities that the user claims ownership through\n */\n ownershipEntityRefs: string[];\n};\n\n/**\n * Token and Identity response, with the users claims in the Identity.\n *\n * @public\n */\nexport type BackstageIdentityResponse = {\n /**\n * The token used to authenticate the user within Backstage.\n */\n token: string;\n\n /**\n * The time at which the token expires. If not set, it can be assumed that the token does not expire.\n */\n expiresAt?: Date;\n\n /**\n * Identity information derived from the token.\n */\n identity: BackstageUserIdentity;\n};\n\n/**\n * Profile information of the user.\n *\n * @public\n */\nexport type ProfileInfo = {\n /**\n * Email ID.\n */\n email?: string;\n\n /**\n * Display name that can be presented to the user.\n */\n displayName?: string;\n\n /**\n * URL to an avatar image of the user.\n */\n picture?: string;\n};\n\n/**\n * Session state values passed to subscribers of the SessionApi.\n *\n * @public\n */\nexport enum SessionState {\n /**\n * User signed in.\n */\n SignedIn = 'SignedIn',\n /**\n * User not signed in.\n */\n SignedOut = 'SignedOut',\n}\n\n/**\n * The SessionApi provides basic controls for any auth provider that is tied to a persistent session.\n *\n * @public\n */\nexport type SessionApi = {\n /**\n * Sign in with a minimum set of permissions.\n */\n signIn(): Promise<void>;\n\n /**\n * Sign out from the current session. This will reload the page.\n */\n signOut(): Promise<void>;\n\n /**\n * Observe the current state of the auth session. Emits the current state on subscription.\n */\n sessionState$(): Observable<SessionState>;\n};\n\n/**\n * Provides authentication towards Google APIs and identities.\n *\n * @public\n * @remarks\n *\n * See {@link https://developers.google.com/identity/protocols/googlescopes} for a full list of supported scopes.\n *\n * Note that the ID token payload is only guaranteed to contain the user's numerical Google ID,\n * email and expiration information. Do not rely on any other fields, as they might not be present.\n */\nexport const googleAuthApiRef: ApiRef<\n OAuthApi &\n OpenIdConnectApi &\n ProfileInfoApi &\n BackstageIdentityApi &\n SessionApi\n> = createApiRef({\n id: 'core.auth.google',\n});\n\n/**\n * Provides authentication towards GitHub APIs.\n *\n * @public\n * @remarks\n *\n * See {@link https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/}\n * for a full list of supported scopes.\n */\nexport const githubAuthApiRef: ApiRef<\n OAuthApi & ProfileInfoApi & BackstageIdentityApi & SessionApi\n> = createApiRef({\n id: 'core.auth.github',\n});\n\n/**\n * Provides authentication towards Okta APIs.\n *\n * @public\n * @remarks\n *\n * See {@link https://developer.okta.com/docs/guides/implement-oauth-for-okta/scopes/}\n * for a full list of supported scopes.\n */\nexport const oktaAuthApiRef: ApiRef<\n OAuthApi &\n OpenIdConnectApi &\n ProfileInfoApi &\n BackstageIdentityApi &\n SessionApi\n> = createApiRef({\n id: 'core.auth.okta',\n});\n\n/**\n * Provides authentication towards GitLab APIs.\n *\n * @public\n * @remarks\n *\n * See {@link https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#limiting-scopes-of-a-personal-access-token}\n * for a full list of supported scopes.\n */\nexport const gitlabAuthApiRef: ApiRef<\n OAuthApi &\n OpenIdConnectApi &\n ProfileInfoApi &\n BackstageIdentityApi &\n SessionApi\n> = createApiRef({\n id: 'core.auth.gitlab',\n});\n\n/**\n * Provides authentication towards Microsoft APIs and identities.\n *\n * @public\n * @remarks\n *\n * For more info and a full list of supported scopes, see:\n * - {@link https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-permissions-and-consent}\n * - {@link https://docs.microsoft.com/en-us/graph/permissions-reference}\n */\nexport const microsoftAuthApiRef: ApiRef<\n OAuthApi &\n OpenIdConnectApi &\n ProfileInfoApi &\n BackstageIdentityApi &\n SessionApi\n> = createApiRef({\n id: 'core.auth.microsoft',\n});\n\n/**\n * Provides authentication towards OneLogin APIs.\n *\n * @public\n */\nexport const oneloginAuthApiRef: ApiRef<\n OAuthApi &\n OpenIdConnectApi &\n ProfileInfoApi &\n BackstageIdentityApi &\n SessionApi\n> = createApiRef({\n id: 'core.auth.onelogin',\n});\n\n/**\n * Provides authentication towards Bitbucket APIs.\n *\n * @public\n * @remarks\n *\n * See {@link https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/}\n * for a full list of supported scopes.\n */\nexport const bitbucketAuthApiRef: ApiRef<\n OAuthApi & ProfileInfoApi & BackstageIdentityApi & SessionApi\n> = createApiRef({\n id: 'core.auth.bitbucket',\n});\n\n/**\n * Provides authentication towards Bitbucket Server APIs.\n *\n * @public\n * @remarks\n *\n * See {@link https://confluence.atlassian.com/bitbucketserver/bitbucket-oauth-2-0-provider-api-1108483661.html#BitbucketOAuth2.0providerAPI-scopes}\n * for a full list of supported scopes.\n */\nexport const bitbucketServerAuthApiRef: ApiRef<\n OAuthApi & ProfileInfoApi & BackstageIdentityApi & SessionApi\n> = createApiRef({\n id: 'core.auth.bitbucket-server',\n});\n\n/**\n * Provides authentication towards Atlassian APIs.\n *\n * @public\n * @remarks\n *\n * See {@link https://developer.atlassian.com/cloud/jira/platform/scopes-for-connect-and-oauth-2-3LO-apps/}\n * for a full list of supported scopes.\n */\nexport const atlassianAuthApiRef: ApiRef<\n OAuthApi & ProfileInfoApi & BackstageIdentityApi & SessionApi\n> = createApiRef({\n id: 'core.auth.atlassian',\n});\n\n/**\n * Provides authentication towards VMware Cloud APIs and identities.\n *\n * @public\n * @remarks\n *\n * For more info about VMware Cloud identity and access management:\n * - {@link https://docs.vmware.com/en/VMware-Cloud-services/services/Using-VMware-Cloud-Services/GUID-53D39337-D93A-4B84-BD18-DDF43C21479A.html}\n */\nexport const vmwareCloudAuthApiRef: ApiRef<\n OAuthApi &\n OpenIdConnectApi &\n ProfileInfoApi &\n BackstageIdentityApi &\n SessionApi\n> = createApiRef({\n id: 'core.auth.vmware-cloud',\n});\n"],"names":["SessionState"],"mappings":";;;;;AA+QY,IAAA,YAAA,qBAAAA,aAAL,KAAA;AAIL,EAAAA,cAAA,UAAW,CAAA,GAAA,UAAA;AAIX,EAAAA,cAAA,WAAY,CAAA,GAAA,WAAA;AARF,EAAAA,OAAAA,aAAAA;AAAA,CAAA,EAAA,YAAA,IAAA,EAAA;AA4CL,MAAM,mBAMT,YAAa,CAAA;AAAA,EACf,EAAI,EAAA;AACN,CAAC;AAWM,MAAM,mBAET,YAAa,CAAA;AAAA,EACf,EAAI,EAAA;AACN,CAAC;AAWM,MAAM,iBAMT,YAAa,CAAA;AAAA,EACf,EAAI,EAAA;AACN,CAAC;AAWM,MAAM,mBAMT,YAAa,CAAA;AAAA,EACf,EAAI,EAAA;AACN,CAAC;AAYM,MAAM,sBAMT,YAAa,CAAA;AAAA,EACf,EAAI,EAAA;AACN,CAAC;AAOM,MAAM,qBAMT,YAAa,CAAA;AAAA,EACf,EAAI,EAAA;AACN,CAAC;AAWM,MAAM,sBAET,YAAa,CAAA;AAAA,EACf,EAAI,EAAA;AACN,CAAC;AAWM,MAAM,4BAET,YAAa,CAAA;AAAA,EACf,EAAI,EAAA;AACN,CAAC;AAWM,MAAM,sBAET,YAAa,CAAA;AAAA,EACf,EAAI,EAAA;AACN,CAAC;AAWM,MAAM,wBAMT,YAAa,CAAA;AAAA,EACf,EAAI,EAAA;AACN,CAAC;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -217,6 +217,10 @@ type AuthProviderInfo = {
|
|
|
217
217
|
* Icon for the auth provider.
|
|
218
218
|
*/
|
|
219
219
|
icon: IconComponent;
|
|
220
|
+
/**
|
|
221
|
+
* Optional user friendly messaage to display for the auth provider.
|
|
222
|
+
*/
|
|
223
|
+
message?: string;
|
|
220
224
|
};
|
|
221
225
|
/**
|
|
222
226
|
* An array of scopes, or a scope string formatted according to the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/core-plugin-api",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.9",
|
|
4
4
|
"description": "Core API used by Backstage plugins",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "web-library"
|
|
@@ -57,16 +57,16 @@
|
|
|
57
57
|
"test": "backstage-cli package test"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@backstage/config": "^1.3.
|
|
60
|
+
"@backstage/config": "^1.3.3",
|
|
61
61
|
"@backstage/errors": "^1.2.7",
|
|
62
62
|
"@backstage/types": "^1.2.1",
|
|
63
63
|
"@backstage/version-bridge": "^1.0.11",
|
|
64
64
|
"history": "^5.0.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@backstage/cli": "^0.33.
|
|
68
|
-
"@backstage/core-app-api": "^1.
|
|
69
|
-
"@backstage/test-utils": "^1.7.
|
|
67
|
+
"@backstage/cli": "^0.33.1",
|
|
68
|
+
"@backstage/core-app-api": "^1.18.0",
|
|
69
|
+
"@backstage/test-utils": "^1.7.10",
|
|
70
70
|
"@testing-library/dom": "^10.0.0",
|
|
71
71
|
"@testing-library/jest-dom": "^6.0.0",
|
|
72
72
|
"@testing-library/react": "^16.0.0",
|