@backstage/plugin-auth-backend 0.21.0-next.2 → 0.21.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/CHANGELOG.md +75 -0
- package/config.d.ts +4 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +85 -85
- package/package.json +22 -22
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
2
2
|
import { LoggerService } from '@backstage/backend-plugin-api';
|
|
3
3
|
import express from 'express';
|
|
4
|
-
import * as _backstage_plugin_auth_node from '@backstage/plugin-auth-node';
|
|
5
|
-
import { BackstageSignInResult, OAuthState as OAuthState$1, AuthResolverCatalogUserQuery as AuthResolverCatalogUserQuery$1, AuthResolverContext as AuthResolverContext$1, CookieConfigurer as CookieConfigurer$1, AuthProviderConfig as AuthProviderConfig$1, AuthProviderRouteHandlers as AuthProviderRouteHandlers$1, AuthProviderFactory as AuthProviderFactory$1, ClientAuthResponse, ProfileInfo as ProfileInfo$1, SignInInfo as SignInInfo$1, SignInResolver as SignInResolver$1, OAuthEnvironmentHandler as OAuthEnvironmentHandler$1, decodeOAuthState, encodeOAuthState, prepareBackstageIdentityResponse as prepareBackstageIdentityResponse$1, TokenParams as TokenParams$1, WebMessageResponse as WebMessageResponse$1 } from '@backstage/plugin-auth-node';
|
|
6
|
-
import { Profile } from 'passport';
|
|
7
4
|
import { PluginDatabaseManager, PluginEndpointDiscovery, TokenManager } from '@backstage/backend-common';
|
|
8
5
|
import { CatalogApi } from '@backstage/catalog-client';
|
|
9
6
|
import { Config } from '@backstage/config';
|
|
7
|
+
import * as _backstage_plugin_auth_node from '@backstage/plugin-auth-node';
|
|
8
|
+
import { AuthProviderFactory as AuthProviderFactory$1, TokenParams as TokenParams$1, ProfileInfo as ProfileInfo$1, BackstageSignInResult, OAuthState as OAuthState$1, AuthResolverCatalogUserQuery as AuthResolverCatalogUserQuery$1, AuthResolverContext as AuthResolverContext$1, CookieConfigurer as CookieConfigurer$1, AuthProviderConfig as AuthProviderConfig$1, AuthProviderRouteHandlers as AuthProviderRouteHandlers$1, ClientAuthResponse, SignInInfo as SignInInfo$1, SignInResolver as SignInResolver$1, OAuthEnvironmentHandler as OAuthEnvironmentHandler$1, decodeOAuthState, encodeOAuthState, prepareBackstageIdentityResponse as prepareBackstageIdentityResponse$1, WebMessageResponse as WebMessageResponse$1 } from '@backstage/plugin-auth-node';
|
|
9
|
+
import { Profile } from 'passport';
|
|
10
10
|
import * as _backstage_plugin_auth_backend_module_aws_alb_provider from '@backstage/plugin-auth-backend-module-aws-alb-provider';
|
|
11
11
|
import { AwsAlbResult as AwsAlbResult$1 } from '@backstage/plugin-auth-backend-module-aws-alb-provider';
|
|
12
12
|
import * as _backstage_plugin_auth_backend_module_oauth2_proxy_provider from '@backstage/plugin-auth-backend-module-oauth2-proxy-provider';
|
|
@@ -24,6 +24,33 @@ import { UserEntity, Entity } from '@backstage/catalog-model';
|
|
|
24
24
|
*/
|
|
25
25
|
declare const authPlugin: () => _backstage_backend_plugin_api.BackendFeature;
|
|
26
26
|
|
|
27
|
+
/** @public */
|
|
28
|
+
type ProviderFactories = {
|
|
29
|
+
[s: string]: AuthProviderFactory$1;
|
|
30
|
+
};
|
|
31
|
+
/** @public */
|
|
32
|
+
interface RouterOptions {
|
|
33
|
+
logger: LoggerService;
|
|
34
|
+
database: PluginDatabaseManager;
|
|
35
|
+
config: Config;
|
|
36
|
+
discovery: PluginEndpointDiscovery;
|
|
37
|
+
tokenManager: TokenManager;
|
|
38
|
+
tokenFactoryAlgorithm?: string;
|
|
39
|
+
providerFactories?: ProviderFactories;
|
|
40
|
+
disableDefaultProviderFactories?: boolean;
|
|
41
|
+
catalogApi?: CatalogApi;
|
|
42
|
+
}
|
|
43
|
+
/** @public */
|
|
44
|
+
declare function createRouter(options: RouterOptions): Promise<express.Router>;
|
|
45
|
+
/** @public */
|
|
46
|
+
declare function createOriginFilter(config: Config): (origin: string) => boolean;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @public
|
|
50
|
+
* @deprecated import from `@backstage/plugin-auth-node` instead
|
|
51
|
+
*/
|
|
52
|
+
type TokenParams = TokenParams$1;
|
|
53
|
+
|
|
27
54
|
/**
|
|
28
55
|
* Common options for passport.js-based OAuth providers
|
|
29
56
|
*
|
|
@@ -64,7 +91,7 @@ type OAuthResult = {
|
|
|
64
91
|
* @deprecated Use `ClientAuthResponse` from `@backstage/plugin-auth-node` instead
|
|
65
92
|
*/
|
|
66
93
|
type OAuthResponse = {
|
|
67
|
-
profile: ProfileInfo;
|
|
94
|
+
profile: ProfileInfo$1;
|
|
68
95
|
providerInfo: OAuthProviderInfo;
|
|
69
96
|
backstageIdentity?: BackstageSignInResult;
|
|
70
97
|
};
|
|
@@ -219,7 +246,7 @@ type SignInResolver<TAuthResult> = SignInResolver$1<TAuthResult>;
|
|
|
219
246
|
* @deprecated Use `createOAuthRouteHandlers` from `@backstage/plugin-auth-node` instead
|
|
220
247
|
*/
|
|
221
248
|
type AuthHandlerResult = {
|
|
222
|
-
profile: ProfileInfo;
|
|
249
|
+
profile: ProfileInfo$1;
|
|
223
250
|
};
|
|
224
251
|
/**
|
|
225
252
|
* The AuthHandler function is called every time the user authenticates using
|
|
@@ -235,7 +262,7 @@ type AuthHandlerResult = {
|
|
|
235
262
|
* @public
|
|
236
263
|
* @deprecated Use `createOAuthRouteHandlers` from `@backstage/plugin-auth-node` instead
|
|
237
264
|
*/
|
|
238
|
-
type AuthHandler<TAuthResult> = (input: TAuthResult, context: AuthResolverContext) => Promise<AuthHandlerResult>;
|
|
265
|
+
type AuthHandler<TAuthResult> = (input: TAuthResult, context: AuthResolverContext$1) => Promise<AuthHandlerResult>;
|
|
239
266
|
/**
|
|
240
267
|
* @public
|
|
241
268
|
* @deprecated Use `createOAuthRouteHandlers` from `@backstage/plugin-auth-node` instead
|
|
@@ -274,7 +301,7 @@ type OAuthAdapterOptions = {
|
|
|
274
301
|
persistScopes?: boolean;
|
|
275
302
|
appOrigin: string;
|
|
276
303
|
baseUrl: string;
|
|
277
|
-
cookieConfigurer: CookieConfigurer;
|
|
304
|
+
cookieConfigurer: CookieConfigurer$1;
|
|
278
305
|
isOriginAllowed: (origin: string) => boolean;
|
|
279
306
|
callbackUrl: string;
|
|
280
307
|
};
|
|
@@ -282,10 +309,10 @@ type OAuthAdapterOptions = {
|
|
|
282
309
|
* @public
|
|
283
310
|
* @deprecated Use `createOAuthRouteHandlers` from `@backstage/plugin-auth-node` instead
|
|
284
311
|
*/
|
|
285
|
-
declare class OAuthAdapter implements AuthProviderRouteHandlers {
|
|
312
|
+
declare class OAuthAdapter implements AuthProviderRouteHandlers$1 {
|
|
286
313
|
private readonly handlers;
|
|
287
314
|
private readonly options;
|
|
288
|
-
static fromConfig(config: AuthProviderConfig, handlers: OAuthHandlers, options: Pick<OAuthAdapterOptions, 'providerId' | 'persistScopes' | 'callbackUrl'>): OAuthAdapter;
|
|
315
|
+
static fromConfig(config: AuthProviderConfig$1, handlers: OAuthHandlers, options: Pick<OAuthAdapterOptions, 'providerId' | 'persistScopes' | 'callbackUrl'>): OAuthAdapter;
|
|
289
316
|
private readonly baseCookieOptions;
|
|
290
317
|
constructor(handlers: OAuthHandlers, options: OAuthAdapterOptions);
|
|
291
318
|
start(req: express.Request, res: express.Response): Promise<void>;
|
|
@@ -504,71 +531,71 @@ declare const providers: Readonly<{
|
|
|
504
531
|
create: (options?: {
|
|
505
532
|
authHandler?: AuthHandler<OAuthResult> | undefined;
|
|
506
533
|
signIn?: {
|
|
507
|
-
resolver: SignInResolver<OAuthResult>;
|
|
534
|
+
resolver: _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
508
535
|
} | undefined;
|
|
509
|
-
} | undefined) =>
|
|
536
|
+
} | undefined) => AuthProviderFactory$1;
|
|
510
537
|
resolvers: never;
|
|
511
538
|
}>;
|
|
512
539
|
auth0: Readonly<{
|
|
513
540
|
create: (options?: {
|
|
514
541
|
authHandler?: AuthHandler<OAuthResult> | undefined;
|
|
515
542
|
signIn?: {
|
|
516
|
-
resolver: SignInResolver<OAuthResult>;
|
|
543
|
+
resolver: _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
517
544
|
} | undefined;
|
|
518
|
-
} | undefined) =>
|
|
545
|
+
} | undefined) => AuthProviderFactory$1;
|
|
519
546
|
resolvers: never;
|
|
520
547
|
}>;
|
|
521
548
|
awsAlb: Readonly<{
|
|
522
549
|
create: (options?: {
|
|
523
550
|
authHandler?: AuthHandler<_backstage_plugin_auth_backend_module_aws_alb_provider.AwsAlbResult> | undefined;
|
|
524
551
|
signIn: {
|
|
525
|
-
resolver: SignInResolver<_backstage_plugin_auth_backend_module_aws_alb_provider.AwsAlbResult>;
|
|
552
|
+
resolver: _backstage_plugin_auth_node.SignInResolver<_backstage_plugin_auth_backend_module_aws_alb_provider.AwsAlbResult>;
|
|
526
553
|
};
|
|
527
|
-
} | undefined) =>
|
|
554
|
+
} | undefined) => AuthProviderFactory$1;
|
|
528
555
|
resolvers: never;
|
|
529
556
|
}>;
|
|
530
557
|
bitbucket: Readonly<{
|
|
531
558
|
create: (options?: {
|
|
532
559
|
authHandler?: AuthHandler<OAuthResult> | undefined;
|
|
533
560
|
signIn?: {
|
|
534
|
-
resolver: SignInResolver<OAuthResult>;
|
|
561
|
+
resolver: _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
535
562
|
} | undefined;
|
|
536
|
-
} | undefined) =>
|
|
563
|
+
} | undefined) => AuthProviderFactory$1;
|
|
537
564
|
resolvers: Readonly<{
|
|
538
|
-
usernameMatchingUserEntityAnnotation(): SignInResolver<OAuthResult>;
|
|
539
|
-
userIdMatchingUserEntityAnnotation(): SignInResolver<OAuthResult>;
|
|
565
|
+
usernameMatchingUserEntityAnnotation(): _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
566
|
+
userIdMatchingUserEntityAnnotation(): _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
540
567
|
}>;
|
|
541
568
|
}>;
|
|
542
569
|
bitbucketServer: Readonly<{
|
|
543
570
|
create: (options?: {
|
|
544
571
|
authHandler?: AuthHandler<BitbucketServerOAuthResult> | undefined;
|
|
545
572
|
signIn?: {
|
|
546
|
-
resolver: SignInResolver<BitbucketServerOAuthResult>;
|
|
573
|
+
resolver: _backstage_plugin_auth_node.SignInResolver<BitbucketServerOAuthResult>;
|
|
547
574
|
} | undefined;
|
|
548
|
-
} | undefined) =>
|
|
575
|
+
} | undefined) => AuthProviderFactory$1;
|
|
549
576
|
resolvers: Readonly<{
|
|
550
|
-
emailMatchingUserEntityProfileEmail: () => SignInResolver<BitbucketServerOAuthResult>;
|
|
577
|
+
emailMatchingUserEntityProfileEmail: () => _backstage_plugin_auth_node.SignInResolver<BitbucketServerOAuthResult>;
|
|
551
578
|
}>;
|
|
552
579
|
}>;
|
|
553
580
|
cfAccess: Readonly<{
|
|
554
581
|
create: (options: {
|
|
555
582
|
authHandler?: AuthHandler<CloudflareAccessResult> | undefined;
|
|
556
583
|
signIn: {
|
|
557
|
-
resolver: SignInResolver<CloudflareAccessResult>;
|
|
584
|
+
resolver: _backstage_plugin_auth_node.SignInResolver<CloudflareAccessResult>;
|
|
558
585
|
};
|
|
559
586
|
cache?: _backstage_backend_plugin_api.CacheService | undefined;
|
|
560
|
-
}) =>
|
|
587
|
+
}) => AuthProviderFactory$1;
|
|
561
588
|
resolvers: Readonly<{
|
|
562
|
-
emailMatchingUserEntityProfileEmail: () => SignInResolver<unknown>;
|
|
589
|
+
emailMatchingUserEntityProfileEmail: () => _backstage_plugin_auth_node.SignInResolver<unknown>;
|
|
563
590
|
}>;
|
|
564
591
|
}>;
|
|
565
592
|
gcpIap: Readonly<{
|
|
566
593
|
create: (options: {
|
|
567
594
|
authHandler?: AuthHandler<_backstage_plugin_auth_backend_module_gcp_iap_provider.GcpIapResult> | undefined;
|
|
568
595
|
signIn: {
|
|
569
|
-
resolver: SignInResolver<_backstage_plugin_auth_backend_module_gcp_iap_provider.GcpIapResult>;
|
|
596
|
+
resolver: _backstage_plugin_auth_node.SignInResolver<_backstage_plugin_auth_backend_module_gcp_iap_provider.GcpIapResult>;
|
|
570
597
|
};
|
|
571
|
-
}) =>
|
|
598
|
+
}) => AuthProviderFactory$1;
|
|
572
599
|
resolvers: never;
|
|
573
600
|
}>;
|
|
574
601
|
github: Readonly<{
|
|
@@ -578,7 +605,7 @@ declare const providers: Readonly<{
|
|
|
578
605
|
resolver: _backstage_plugin_auth_node.SignInResolver<GithubOAuthResult>;
|
|
579
606
|
} | undefined;
|
|
580
607
|
stateEncoder?: StateEncoder | undefined;
|
|
581
|
-
} | undefined) =>
|
|
608
|
+
} | undefined) => AuthProviderFactory$1;
|
|
582
609
|
resolvers: Readonly<{
|
|
583
610
|
usernameMatchingUserEntityName: () => _backstage_plugin_auth_node.SignInResolver<GithubOAuthResult>;
|
|
584
611
|
}>;
|
|
@@ -587,18 +614,18 @@ declare const providers: Readonly<{
|
|
|
587
614
|
create: (options?: {
|
|
588
615
|
authHandler?: AuthHandler<OAuthResult> | undefined;
|
|
589
616
|
signIn?: {
|
|
590
|
-
resolver: SignInResolver<OAuthResult>;
|
|
617
|
+
resolver: _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
591
618
|
} | undefined;
|
|
592
|
-
} | undefined) =>
|
|
619
|
+
} | undefined) => AuthProviderFactory$1;
|
|
593
620
|
resolvers: never;
|
|
594
621
|
}>;
|
|
595
622
|
google: Readonly<{
|
|
596
623
|
create: (options?: {
|
|
597
624
|
authHandler?: AuthHandler<OAuthResult> | undefined;
|
|
598
625
|
signIn?: {
|
|
599
|
-
resolver: SignInResolver<OAuthResult>;
|
|
626
|
+
resolver: _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
600
627
|
} | undefined;
|
|
601
|
-
} | undefined) =>
|
|
628
|
+
} | undefined) => AuthProviderFactory$1;
|
|
602
629
|
resolvers: Readonly<{
|
|
603
630
|
emailMatchingUserEntityProfileEmail: () => _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
604
631
|
emailLocalPartMatchingUserEntityName: () => _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
@@ -609,9 +636,9 @@ declare const providers: Readonly<{
|
|
|
609
636
|
create: (options?: {
|
|
610
637
|
authHandler?: AuthHandler<OAuthResult> | undefined;
|
|
611
638
|
signIn?: {
|
|
612
|
-
resolver: SignInResolver<OAuthResult>;
|
|
639
|
+
resolver: _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
613
640
|
} | undefined;
|
|
614
|
-
} | undefined) =>
|
|
641
|
+
} | undefined) => AuthProviderFactory$1;
|
|
615
642
|
resolvers: Readonly<{
|
|
616
643
|
emailMatchingUserEntityProfileEmail: () => _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
617
644
|
emailLocalPartMatchingUserEntityName: () => _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
@@ -622,72 +649,72 @@ declare const providers: Readonly<{
|
|
|
622
649
|
create: (options?: {
|
|
623
650
|
authHandler?: AuthHandler<OAuthResult> | undefined;
|
|
624
651
|
signIn?: {
|
|
625
|
-
resolver: SignInResolver<OAuthResult>;
|
|
652
|
+
resolver: _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
626
653
|
} | undefined;
|
|
627
|
-
} | undefined) =>
|
|
654
|
+
} | undefined) => AuthProviderFactory$1;
|
|
628
655
|
resolvers: never;
|
|
629
656
|
}>;
|
|
630
657
|
oauth2Proxy: Readonly<{
|
|
631
658
|
create: (options: {
|
|
632
659
|
authHandler?: AuthHandler<_backstage_plugin_auth_backend_module_oauth2_proxy_provider.OAuth2ProxyResult> | undefined;
|
|
633
660
|
signIn: {
|
|
634
|
-
resolver: SignInResolver<_backstage_plugin_auth_backend_module_oauth2_proxy_provider.OAuth2ProxyResult>;
|
|
661
|
+
resolver: _backstage_plugin_auth_node.SignInResolver<_backstage_plugin_auth_backend_module_oauth2_proxy_provider.OAuth2ProxyResult>;
|
|
635
662
|
};
|
|
636
|
-
}) =>
|
|
663
|
+
}) => AuthProviderFactory$1;
|
|
637
664
|
resolvers: never;
|
|
638
665
|
}>;
|
|
639
666
|
oidc: Readonly<{
|
|
640
667
|
create: (options?: {
|
|
641
668
|
authHandler?: AuthHandler<_backstage_plugin_auth_backend_module_oidc_provider.OidcAuthResult> | undefined;
|
|
642
669
|
signIn?: {
|
|
643
|
-
resolver: SignInResolver<_backstage_plugin_auth_backend_module_oidc_provider.OidcAuthResult>;
|
|
670
|
+
resolver: _backstage_plugin_auth_node.SignInResolver<_backstage_plugin_auth_backend_module_oidc_provider.OidcAuthResult>;
|
|
644
671
|
} | undefined;
|
|
645
|
-
} | undefined) =>
|
|
672
|
+
} | undefined) => AuthProviderFactory$1;
|
|
646
673
|
resolvers: Readonly<{
|
|
647
|
-
emailLocalPartMatchingUserEntityName: () => SignInResolver<unknown>;
|
|
648
|
-
emailMatchingUserEntityProfileEmail: () => SignInResolver<unknown>;
|
|
674
|
+
emailLocalPartMatchingUserEntityName: () => _backstage_plugin_auth_node.SignInResolver<unknown>;
|
|
675
|
+
emailMatchingUserEntityProfileEmail: () => _backstage_plugin_auth_node.SignInResolver<unknown>;
|
|
649
676
|
}>;
|
|
650
677
|
}>;
|
|
651
678
|
okta: Readonly<{
|
|
652
679
|
create: (options?: {
|
|
653
680
|
authHandler?: AuthHandler<OAuthResult> | undefined;
|
|
654
681
|
signIn?: {
|
|
655
|
-
resolver: SignInResolver<OAuthResult>;
|
|
682
|
+
resolver: _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
656
683
|
} | undefined;
|
|
657
|
-
} | undefined) =>
|
|
684
|
+
} | undefined) => AuthProviderFactory$1;
|
|
658
685
|
resolvers: Readonly<{
|
|
659
|
-
emailLocalPartMatchingUserEntityName: () => SignInResolver<unknown>;
|
|
660
|
-
emailMatchingUserEntityProfileEmail: () => SignInResolver<unknown>;
|
|
661
|
-
emailMatchingUserEntityAnnotation(): SignInResolver<OAuthResult>;
|
|
686
|
+
emailLocalPartMatchingUserEntityName: () => _backstage_plugin_auth_node.SignInResolver<unknown>;
|
|
687
|
+
emailMatchingUserEntityProfileEmail: () => _backstage_plugin_auth_node.SignInResolver<unknown>;
|
|
688
|
+
emailMatchingUserEntityAnnotation(): _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
662
689
|
}>;
|
|
663
690
|
}>;
|
|
664
691
|
onelogin: Readonly<{
|
|
665
692
|
create: (options?: {
|
|
666
693
|
authHandler?: AuthHandler<OAuthResult> | undefined;
|
|
667
694
|
signIn?: {
|
|
668
|
-
resolver: SignInResolver<OAuthResult>;
|
|
695
|
+
resolver: _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
669
696
|
} | undefined;
|
|
670
|
-
} | undefined) =>
|
|
697
|
+
} | undefined) => AuthProviderFactory$1;
|
|
671
698
|
resolvers: never;
|
|
672
699
|
}>;
|
|
673
700
|
saml: Readonly<{
|
|
674
701
|
create: (options?: {
|
|
675
702
|
authHandler?: AuthHandler<SamlAuthResult> | undefined;
|
|
676
703
|
signIn?: {
|
|
677
|
-
resolver: SignInResolver<SamlAuthResult>;
|
|
704
|
+
resolver: _backstage_plugin_auth_node.SignInResolver<SamlAuthResult>;
|
|
678
705
|
} | undefined;
|
|
679
|
-
} | undefined) =>
|
|
706
|
+
} | undefined) => AuthProviderFactory$1;
|
|
680
707
|
resolvers: Readonly<{
|
|
681
|
-
nameIdMatchingUserEntityName(): SignInResolver<SamlAuthResult>;
|
|
708
|
+
nameIdMatchingUserEntityName(): _backstage_plugin_auth_node.SignInResolver<SamlAuthResult>;
|
|
682
709
|
}>;
|
|
683
710
|
}>;
|
|
684
711
|
easyAuth: Readonly<{
|
|
685
712
|
create: (options?: {
|
|
686
713
|
authHandler?: AuthHandler<EasyAuthResult> | undefined;
|
|
687
714
|
signIn: {
|
|
688
|
-
resolver: SignInResolver<EasyAuthResult>;
|
|
715
|
+
resolver: _backstage_plugin_auth_node.SignInResolver<EasyAuthResult>;
|
|
689
716
|
};
|
|
690
|
-
} | undefined) =>
|
|
717
|
+
} | undefined) => AuthProviderFactory$1;
|
|
691
718
|
resolvers: never;
|
|
692
719
|
}>;
|
|
693
720
|
}>;
|
|
@@ -697,7 +724,7 @@ declare const providers: Readonly<{
|
|
|
697
724
|
* @public
|
|
698
725
|
*/
|
|
699
726
|
declare const defaultAuthProviderFactories: {
|
|
700
|
-
[providerId: string]: AuthProviderFactory;
|
|
727
|
+
[providerId: string]: AuthProviderFactory$1;
|
|
701
728
|
};
|
|
702
729
|
|
|
703
730
|
/**
|
|
@@ -710,12 +737,12 @@ declare const defaultAuthProviderFactories: {
|
|
|
710
737
|
* @public
|
|
711
738
|
*/
|
|
712
739
|
declare function createAuthProviderIntegration<TCreateOptions extends unknown[], TResolvers extends {
|
|
713
|
-
[name in string]: (...args: any[]) => SignInResolver<any>;
|
|
740
|
+
[name in string]: (...args: any[]) => SignInResolver$1<any>;
|
|
714
741
|
}>(config: {
|
|
715
|
-
create: (...args: TCreateOptions) => AuthProviderFactory;
|
|
742
|
+
create: (...args: TCreateOptions) => AuthProviderFactory$1;
|
|
716
743
|
resolvers?: TResolvers;
|
|
717
744
|
}): Readonly<{
|
|
718
|
-
create: (...args: TCreateOptions) => AuthProviderFactory;
|
|
745
|
+
create: (...args: TCreateOptions) => AuthProviderFactory$1;
|
|
719
746
|
resolvers: Readonly<string extends keyof TResolvers ? never : TResolvers>;
|
|
720
747
|
}>;
|
|
721
748
|
|
|
@@ -725,33 +752,6 @@ declare function createAuthProviderIntegration<TCreateOptions extends unknown[],
|
|
|
725
752
|
*/
|
|
726
753
|
declare const prepareBackstageIdentityResponse: typeof prepareBackstageIdentityResponse$1;
|
|
727
754
|
|
|
728
|
-
/** @public */
|
|
729
|
-
type ProviderFactories = {
|
|
730
|
-
[s: string]: AuthProviderFactory;
|
|
731
|
-
};
|
|
732
|
-
/** @public */
|
|
733
|
-
interface RouterOptions {
|
|
734
|
-
logger: LoggerService;
|
|
735
|
-
database: PluginDatabaseManager;
|
|
736
|
-
config: Config;
|
|
737
|
-
discovery: PluginEndpointDiscovery;
|
|
738
|
-
tokenManager: TokenManager;
|
|
739
|
-
tokenFactoryAlgorithm?: string;
|
|
740
|
-
providerFactories?: ProviderFactories;
|
|
741
|
-
disableDefaultProviderFactories?: boolean;
|
|
742
|
-
catalogApi?: CatalogApi;
|
|
743
|
-
}
|
|
744
|
-
/** @public */
|
|
745
|
-
declare function createRouter(options: RouterOptions): Promise<express.Router>;
|
|
746
|
-
/** @public */
|
|
747
|
-
declare function createOriginFilter(config: Config): (origin: string) => boolean;
|
|
748
|
-
|
|
749
|
-
/**
|
|
750
|
-
* @public
|
|
751
|
-
* @deprecated import from `@backstage/plugin-auth-node` instead
|
|
752
|
-
*/
|
|
753
|
-
type TokenParams = TokenParams$1;
|
|
754
|
-
|
|
755
755
|
/**
|
|
756
756
|
* @public
|
|
757
757
|
* @deprecated import from `@backstage/plugin-auth-node` instead
|
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.21.0
|
|
4
|
+
"version": "0.21.0",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -32,25 +32,25 @@
|
|
|
32
32
|
"clean": "backstage-cli package clean"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@backstage/backend-common": "^0.21.0
|
|
36
|
-
"@backstage/backend-plugin-api": "^0.6.10
|
|
37
|
-
"@backstage/catalog-client": "^1.6.0
|
|
38
|
-
"@backstage/catalog-model": "^1.4.4
|
|
35
|
+
"@backstage/backend-common": "^0.21.0",
|
|
36
|
+
"@backstage/backend-plugin-api": "^0.6.10",
|
|
37
|
+
"@backstage/catalog-client": "^1.6.0",
|
|
38
|
+
"@backstage/catalog-model": "^1.4.4",
|
|
39
39
|
"@backstage/config": "^1.1.1",
|
|
40
40
|
"@backstage/errors": "^1.2.3",
|
|
41
|
-
"@backstage/plugin-auth-backend-module-atlassian-provider": "^0.1.2
|
|
42
|
-
"@backstage/plugin-auth-backend-module-aws-alb-provider": "^0.1.0
|
|
43
|
-
"@backstage/plugin-auth-backend-module-gcp-iap-provider": "^0.2.4
|
|
44
|
-
"@backstage/plugin-auth-backend-module-github-provider": "^0.1.7
|
|
45
|
-
"@backstage/plugin-auth-backend-module-gitlab-provider": "^0.1.7
|
|
46
|
-
"@backstage/plugin-auth-backend-module-google-provider": "^0.1.7
|
|
47
|
-
"@backstage/plugin-auth-backend-module-microsoft-provider": "^0.1.5
|
|
48
|
-
"@backstage/plugin-auth-backend-module-oauth2-provider": "^0.1.7
|
|
49
|
-
"@backstage/plugin-auth-backend-module-oauth2-proxy-provider": "^0.1.2
|
|
50
|
-
"@backstage/plugin-auth-backend-module-oidc-provider": "^0.1.0
|
|
51
|
-
"@backstage/plugin-auth-backend-module-okta-provider": "^0.0.3
|
|
52
|
-
"@backstage/plugin-auth-node": "^0.4.4
|
|
53
|
-
"@backstage/plugin-catalog-node": "^1.
|
|
41
|
+
"@backstage/plugin-auth-backend-module-atlassian-provider": "^0.1.2",
|
|
42
|
+
"@backstage/plugin-auth-backend-module-aws-alb-provider": "^0.1.0",
|
|
43
|
+
"@backstage/plugin-auth-backend-module-gcp-iap-provider": "^0.2.4",
|
|
44
|
+
"@backstage/plugin-auth-backend-module-github-provider": "^0.1.7",
|
|
45
|
+
"@backstage/plugin-auth-backend-module-gitlab-provider": "^0.1.7",
|
|
46
|
+
"@backstage/plugin-auth-backend-module-google-provider": "^0.1.7",
|
|
47
|
+
"@backstage/plugin-auth-backend-module-microsoft-provider": "^0.1.5",
|
|
48
|
+
"@backstage/plugin-auth-backend-module-oauth2-provider": "^0.1.7",
|
|
49
|
+
"@backstage/plugin-auth-backend-module-oauth2-proxy-provider": "^0.1.2",
|
|
50
|
+
"@backstage/plugin-auth-backend-module-oidc-provider": "^0.1.0",
|
|
51
|
+
"@backstage/plugin-auth-backend-module-okta-provider": "^0.0.3",
|
|
52
|
+
"@backstage/plugin-auth-node": "^0.4.4",
|
|
53
|
+
"@backstage/plugin-catalog-node": "^1.7.0",
|
|
54
54
|
"@backstage/types": "^1.1.1",
|
|
55
55
|
"@google-cloud/firestore": "^7.0.0",
|
|
56
56
|
"@node-saml/passport-saml": "^4.0.4",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"express": "^4.17.1",
|
|
64
64
|
"express-promise-router": "^4.1.0",
|
|
65
65
|
"express-session": "^1.17.1",
|
|
66
|
-
"fs-extra": "
|
|
66
|
+
"fs-extra": "^11.2.0",
|
|
67
67
|
"google-auth-library": "^8.0.0",
|
|
68
68
|
"jose": "^4.6.0",
|
|
69
69
|
"knex": "^3.0.0",
|
|
@@ -87,9 +87,9 @@
|
|
|
87
87
|
"yn": "^4.0.0"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
|
-
"@backstage/backend-defaults": "^0.2.10
|
|
91
|
-
"@backstage/backend-test-utils": "^0.3.0
|
|
92
|
-
"@backstage/cli": "^0.25.2
|
|
90
|
+
"@backstage/backend-defaults": "^0.2.10",
|
|
91
|
+
"@backstage/backend-test-utils": "^0.3.0",
|
|
92
|
+
"@backstage/cli": "^0.25.2",
|
|
93
93
|
"@types/body-parser": "^1.19.0",
|
|
94
94
|
"@types/cookie-parser": "^1.4.2",
|
|
95
95
|
"@types/express-session": "^1.17.2",
|