@backstage/plugin-auth-backend 0.3.24 → 0.4.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 +59 -0
- package/config.d.ts +1 -1
- package/dist/index.cjs.js +156 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +44 -1
- package/package.json +12 -10
package/dist/index.d.ts
CHANGED
|
@@ -561,6 +561,49 @@ declare type OktaProviderOptions = {
|
|
|
561
561
|
};
|
|
562
562
|
declare const createOktaProvider: (_options?: OktaProviderOptions | undefined) => AuthProviderFactory;
|
|
563
563
|
|
|
564
|
+
declare type BitbucketOAuthResult = {
|
|
565
|
+
fullProfile: BitbucketPassportProfile;
|
|
566
|
+
params: {
|
|
567
|
+
id_token?: string;
|
|
568
|
+
scope: string;
|
|
569
|
+
expires_in: number;
|
|
570
|
+
};
|
|
571
|
+
accessToken: string;
|
|
572
|
+
refreshToken?: string;
|
|
573
|
+
};
|
|
574
|
+
declare type BitbucketPassportProfile = Profile & {
|
|
575
|
+
id?: string;
|
|
576
|
+
displayName?: string;
|
|
577
|
+
username?: string;
|
|
578
|
+
avatarUrl?: string;
|
|
579
|
+
_json?: {
|
|
580
|
+
links?: {
|
|
581
|
+
avatar?: {
|
|
582
|
+
href?: string;
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
};
|
|
586
|
+
};
|
|
587
|
+
declare const bitbucketUsernameSignInResolver: SignInResolver<BitbucketOAuthResult>;
|
|
588
|
+
declare const bitbucketUserIdSignInResolver: SignInResolver<BitbucketOAuthResult>;
|
|
589
|
+
declare type BitbucketProviderOptions = {
|
|
590
|
+
/**
|
|
591
|
+
* The profile transformation function used to verify and convert the auth response
|
|
592
|
+
* into the profile that will be presented to the user.
|
|
593
|
+
*/
|
|
594
|
+
authHandler?: AuthHandler<OAuthResult>;
|
|
595
|
+
/**
|
|
596
|
+
* Configure sign-in for this provider, without it the provider can not be used to sign users in.
|
|
597
|
+
*/
|
|
598
|
+
signIn?: {
|
|
599
|
+
/**
|
|
600
|
+
* Maps an auth result to a Backstage identity for the user.
|
|
601
|
+
*/
|
|
602
|
+
resolver: SignInResolver<OAuthResult>;
|
|
603
|
+
};
|
|
604
|
+
};
|
|
605
|
+
declare const createBitbucketProvider: (options?: BitbucketProviderOptions | undefined) => AuthProviderFactory;
|
|
606
|
+
|
|
564
607
|
declare const factories: {
|
|
565
608
|
[providerId: string]: AuthProviderFactory;
|
|
566
609
|
};
|
|
@@ -593,4 +636,4 @@ declare type WebMessageResponse = {
|
|
|
593
636
|
declare const postMessageResponse: (res: express.Response, appOrigin: string, response: WebMessageResponse) => void;
|
|
594
637
|
declare const ensuresXRequestedWith: (req: express.Request) => boolean;
|
|
595
638
|
|
|
596
|
-
export { AuthProviderFactory, AuthProviderFactoryOptions, AuthProviderRouteHandlers, AuthResponse, BackstageIdentity, GithubOAuthResult, GithubProviderOptions, GitlabProviderOptions, GoogleProviderOptions, IdentityClient, MicrosoftProviderOptions, OAuth2ProviderOptions, OAuthAdapter, OAuthEnvironmentHandler, OAuthHandlers, OAuthProviderInfo, OAuthProviderOptions, OAuthRefreshRequest, OAuthResponse, OAuthResult, OAuthStartRequest, OAuthState, OktaProviderOptions, ProfileInfo, RouterOptions, TokenIssuer, WebMessageResponse, createGithubProvider, createGitlabProvider, createGoogleProvider, createMicrosoftProvider, createOAuth2Provider, createOktaProvider, createOriginFilter, createRouter, factories as defaultAuthProviderFactories, encodeState, ensuresXRequestedWith, googleEmailSignInResolver, microsoftEmailSignInResolver, oktaEmailSignInResolver, postMessageResponse, readState, verifyNonce };
|
|
639
|
+
export { AuthProviderFactory, AuthProviderFactoryOptions, AuthProviderRouteHandlers, AuthResponse, BackstageIdentity, BitbucketOAuthResult, BitbucketPassportProfile, BitbucketProviderOptions, GithubOAuthResult, GithubProviderOptions, GitlabProviderOptions, GoogleProviderOptions, IdentityClient, MicrosoftProviderOptions, OAuth2ProviderOptions, OAuthAdapter, OAuthEnvironmentHandler, OAuthHandlers, OAuthProviderInfo, OAuthProviderOptions, OAuthRefreshRequest, OAuthResponse, OAuthResult, OAuthStartRequest, OAuthState, OktaProviderOptions, ProfileInfo, RouterOptions, TokenIssuer, WebMessageResponse, bitbucketUserIdSignInResolver, bitbucketUsernameSignInResolver, createBitbucketProvider, createGithubProvider, createGitlabProvider, createGoogleProvider, createMicrosoftProvider, createOAuth2Provider, createOktaProvider, createOriginFilter, createRouter, factories as defaultAuthProviderFactories, encodeState, ensuresXRequestedWith, googleEmailSignInResolver, microsoftEmailSignInResolver, oktaEmailSignInResolver, postMessageResponse, readState, verifyNonce };
|
package/package.json
CHANGED
|
@@ -1,6 +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.3",
|
|
4
5
|
"main": "dist/index.cjs.js",
|
|
5
6
|
"types": "dist/index.d.ts",
|
|
6
7
|
"license": "Apache-2.0",
|
|
@@ -29,12 +30,12 @@
|
|
|
29
30
|
"clean": "backstage-cli clean"
|
|
30
31
|
},
|
|
31
32
|
"dependencies": {
|
|
32
|
-
"@backstage/backend-common": "^0.9.
|
|
33
|
-
"@backstage/catalog-client": "^0.
|
|
34
|
-
"@backstage/catalog-model": "^0.9.
|
|
35
|
-
"@backstage/config": "^0.1.
|
|
33
|
+
"@backstage/backend-common": "^0.9.6",
|
|
34
|
+
"@backstage/catalog-client": "^0.5.0",
|
|
35
|
+
"@backstage/catalog-model": "^0.9.4",
|
|
36
|
+
"@backstage/config": "^0.1.10",
|
|
36
37
|
"@backstage/errors": "^0.1.1",
|
|
37
|
-
"@backstage/test-utils": "^0.1.
|
|
38
|
+
"@backstage/test-utils": "^0.1.18",
|
|
38
39
|
"@types/express": "^4.17.6",
|
|
39
40
|
"@types/passport": "^1.0.3",
|
|
40
41
|
"compression": "^1.7.4",
|
|
@@ -57,6 +58,7 @@
|
|
|
57
58
|
"node-cache": "^5.1.2",
|
|
58
59
|
"openid-client": "^4.2.1",
|
|
59
60
|
"passport": "^0.4.1",
|
|
61
|
+
"passport-bitbucket-oauth2": "^0.1.2",
|
|
60
62
|
"passport-github2": "^0.1.12",
|
|
61
63
|
"passport-gitlab2": "^5.0.0",
|
|
62
64
|
"passport-google-oauth20": "^2.0.0",
|
|
@@ -64,13 +66,13 @@
|
|
|
64
66
|
"passport-oauth2": "^1.5.0",
|
|
65
67
|
"passport-okta-oauth": "^0.0.1",
|
|
66
68
|
"passport-onelogin-oauth": "^0.0.1",
|
|
67
|
-
"passport-saml": "^
|
|
69
|
+
"passport-saml": "^3.1.2",
|
|
68
70
|
"uuid": "^8.0.0",
|
|
69
71
|
"winston": "^3.2.1",
|
|
70
72
|
"yn": "^4.0.0"
|
|
71
73
|
},
|
|
72
74
|
"devDependencies": {
|
|
73
|
-
"@backstage/cli": "^0.7.
|
|
75
|
+
"@backstage/cli": "^0.7.15",
|
|
74
76
|
"@types/body-parser": "^1.19.0",
|
|
75
77
|
"@types/cookie-parser": "^1.4.2",
|
|
76
78
|
"@types/express-session": "^1.17.2",
|
|
@@ -78,7 +80,7 @@
|
|
|
78
80
|
"@types/passport-github2": "^1.2.4",
|
|
79
81
|
"@types/passport-google-oauth20": "^2.0.3",
|
|
80
82
|
"@types/passport-microsoft": "^0.0.0",
|
|
81
|
-
"@types/passport-saml": "^1.1.
|
|
83
|
+
"@types/passport-saml": "^1.1.3",
|
|
82
84
|
"@types/passport-strategy": "^0.2.35",
|
|
83
85
|
"@types/xml2js": "^0.4.7",
|
|
84
86
|
"msw": "^0.29.0"
|
|
@@ -89,5 +91,5 @@
|
|
|
89
91
|
"config.d.ts"
|
|
90
92
|
],
|
|
91
93
|
"configSchema": "config.d.ts",
|
|
92
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "16279cb3284369941e2eaf8b8968da207232cd6d"
|
|
93
95
|
}
|