@backstage/plugin-auth-backend 0.24.5 → 0.25.0-next.1
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 +61 -0
- package/config.d.ts +9 -58
- package/dist/authPlugin.cjs.js +4 -8
- package/dist/authPlugin.cjs.js.map +1 -1
- package/dist/database/AuthDatabase.cjs.js +0 -16
- package/dist/database/AuthDatabase.cjs.js.map +1 -1
- package/dist/identity/StaticTokenIssuer.cjs.js +14 -21
- package/dist/identity/StaticTokenIssuer.cjs.js.map +1 -1
- package/dist/identity/TokenFactory.cjs.js +11 -76
- package/dist/identity/TokenFactory.cjs.js.map +1 -1
- package/dist/identity/issueUserToken.cjs.js +98 -0
- package/dist/identity/issueUserToken.cjs.js.map +1 -0
- package/dist/index.cjs.js +0 -26
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -850
- package/dist/lib/catalog/CatalogIdentityClient.cjs.js +11 -20
- package/dist/lib/catalog/CatalogIdentityClient.cjs.js.map +1 -1
- package/dist/lib/resolvers/CatalogAuthResolverContext.cjs.js +16 -21
- package/dist/lib/resolvers/CatalogAuthResolverContext.cjs.js.map +1 -1
- package/dist/providers/router.cjs.js +2 -9
- package/dist/providers/router.cjs.js.map +1 -1
- package/dist/service/router.cjs.js +13 -18
- package/dist/service/router.cjs.js.map +1 -1
- package/package.json +16 -58
- package/dist/lib/flow/authFlowHelpers.cjs.js +0 -43
- package/dist/lib/flow/authFlowHelpers.cjs.js.map +0 -1
- package/dist/lib/legacy/adaptLegacyOAuthHandler.cjs.js +0 -20
- package/dist/lib/legacy/adaptLegacyOAuthHandler.cjs.js.map +0 -1
- package/dist/lib/legacy/adaptLegacyOAuthSignInResolver.cjs.js +0 -24
- package/dist/lib/legacy/adaptLegacyOAuthSignInResolver.cjs.js.map +0 -1
- package/dist/lib/legacy/adaptOAuthSignInResolverToLegacy.cjs.js +0 -29
- package/dist/lib/legacy/adaptOAuthSignInResolverToLegacy.cjs.js.map +0 -1
- package/dist/lib/oauth/OAuthAdapter.cjs.js +0 -220
- package/dist/lib/oauth/OAuthAdapter.cjs.js.map +0 -1
- package/dist/lib/oauth/OAuthEnvironmentHandler.cjs.js +0 -8
- package/dist/lib/oauth/OAuthEnvironmentHandler.cjs.js.map +0 -1
- package/dist/lib/oauth/helpers.cjs.js +0 -40
- package/dist/lib/oauth/helpers.cjs.js.map +0 -1
- package/dist/lib/passport/PassportStrategyHelper.cjs.js +0 -49
- package/dist/lib/passport/PassportStrategyHelper.cjs.js.map +0 -1
- package/dist/providers/atlassian/provider.cjs.js +0 -20
- package/dist/providers/atlassian/provider.cjs.js.map +0 -1
- package/dist/providers/auth0/provider.cjs.js +0 -20
- package/dist/providers/auth0/provider.cjs.js.map +0 -1
- package/dist/providers/aws-alb/provider.cjs.js +0 -18
- package/dist/providers/aws-alb/provider.cjs.js.map +0 -1
- package/dist/providers/azure-easyauth/provider.cjs.js +0 -18
- package/dist/providers/azure-easyauth/provider.cjs.js.map +0 -1
- package/dist/providers/bitbucket/provider.cjs.js +0 -25
- package/dist/providers/bitbucket/provider.cjs.js.map +0 -1
- package/dist/providers/bitbucketServer/provider.cjs.js +0 -46
- package/dist/providers/bitbucketServer/provider.cjs.js.map +0 -1
- package/dist/providers/cloudflare-access/provider.cjs.js +0 -22
- package/dist/providers/cloudflare-access/provider.cjs.js.map +0 -1
- package/dist/providers/createAuthProviderIntegration.cjs.js +0 -11
- package/dist/providers/createAuthProviderIntegration.cjs.js.map +0 -1
- package/dist/providers/gcp-iap/provider.cjs.js +0 -18
- package/dist/providers/gcp-iap/provider.cjs.js.map +0 -1
- package/dist/providers/github/provider.cjs.js +0 -61
- package/dist/providers/github/provider.cjs.js.map +0 -1
- package/dist/providers/gitlab/provider.cjs.js +0 -20
- package/dist/providers/gitlab/provider.cjs.js.map +0 -1
- package/dist/providers/google/provider.cjs.js +0 -26
- package/dist/providers/google/provider.cjs.js.map +0 -1
- package/dist/providers/microsoft/provider.cjs.js +0 -27
- package/dist/providers/microsoft/provider.cjs.js.map +0 -1
- package/dist/providers/oauth2/provider.cjs.js +0 -20
- package/dist/providers/oauth2/provider.cjs.js.map +0 -1
- package/dist/providers/oauth2-proxy/provider.cjs.js +0 -18
- package/dist/providers/oauth2-proxy/provider.cjs.js.map +0 -1
- package/dist/providers/oidc/provider.cjs.js +0 -37
- package/dist/providers/oidc/provider.cjs.js.map +0 -1
- package/dist/providers/okta/provider.cjs.js +0 -47
- package/dist/providers/okta/provider.cjs.js.map +0 -1
- package/dist/providers/onelogin/provider.cjs.js +0 -20
- package/dist/providers/onelogin/provider.cjs.js.map +0 -1
- package/dist/providers/prepareBackstageIdentityResponse.cjs.js +0 -8
- package/dist/providers/prepareBackstageIdentityResponse.cjs.js.map +0 -1
- package/dist/providers/providers.cjs.js +0 -62
- package/dist/providers/providers.cjs.js.map +0 -1
- package/dist/providers/resolvers.cjs.js +0 -27
- package/dist/providers/resolvers.cjs.js.map +0 -1
- package/dist/providers/saml/provider.cjs.js +0 -121
- package/dist/providers/saml/provider.cjs.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1,4 @@
|
|
|
1
1
|
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
2
|
-
import { LoggerService, DatabaseService, RootConfigService, DiscoveryService, AuthService, HttpAuthService } from '@backstage/backend-plugin-api';
|
|
3
|
-
import express from 'express';
|
|
4
|
-
import * as _backstage_plugin_auth_node from '@backstage/plugin-auth-node';
|
|
5
|
-
import { TokenParams as TokenParams$1, AuthProviderFactory as AuthProviderFactory$1, AuthOwnershipResolver, 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';
|
|
6
|
-
import { TokenManager } from '@backstage/backend-common';
|
|
7
|
-
import { CatalogApi } from '@backstage/catalog-client';
|
|
8
|
-
import { Config } from '@backstage/config';
|
|
9
|
-
import { Profile } from 'passport';
|
|
10
|
-
import * as _backstage_plugin_auth_backend_module_aws_alb_provider from '@backstage/plugin-auth-backend-module-aws-alb-provider';
|
|
11
|
-
import { AwsAlbResult as AwsAlbResult$1 } from '@backstage/plugin-auth-backend-module-aws-alb-provider';
|
|
12
|
-
import * as _backstage_plugin_auth_backend_module_azure_easyauth_provider from '@backstage/plugin-auth-backend-module-azure-easyauth-provider';
|
|
13
|
-
import { AzureEasyAuthResult } from '@backstage/plugin-auth-backend-module-azure-easyauth-provider';
|
|
14
|
-
import * as _backstage_plugin_auth_backend_module_oauth2_proxy_provider from '@backstage/plugin-auth-backend-module-oauth2-proxy-provider';
|
|
15
|
-
import { OAuth2ProxyResult as OAuth2ProxyResult$1 } from '@backstage/plugin-auth-backend-module-oauth2-proxy-provider';
|
|
16
|
-
import * as _backstage_plugin_auth_backend_module_oidc_provider from '@backstage/plugin-auth-backend-module-oidc-provider';
|
|
17
|
-
import { OidcAuthResult as OidcAuthResult$1 } from '@backstage/plugin-auth-backend-module-oidc-provider';
|
|
18
|
-
import { GcpIapTokenInfo as GcpIapTokenInfo$1, GcpIapResult as GcpIapResult$1 } from '@backstage/plugin-auth-backend-module-gcp-iap-provider';
|
|
19
|
-
import * as _backstage_plugin_auth_backend_module_cloudflare_access_provider from '@backstage/plugin-auth-backend-module-cloudflare-access-provider';
|
|
20
|
-
import { UserEntity, Entity } from '@backstage/catalog-model';
|
|
21
2
|
|
|
22
3
|
/**
|
|
23
4
|
* Auth plugin
|
|
@@ -26,834 +7,4 @@ import { UserEntity, Entity } from '@backstage/catalog-model';
|
|
|
26
7
|
*/
|
|
27
8
|
declare const authPlugin: _backstage_backend_plugin_api.BackendFeature;
|
|
28
9
|
|
|
29
|
-
|
|
30
|
-
* @public
|
|
31
|
-
* @deprecated import from `@backstage/plugin-auth-node` instead
|
|
32
|
-
*/
|
|
33
|
-
type TokenParams = TokenParams$1;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* @public
|
|
37
|
-
* @deprecated Migrate the auth plugin to the new backend system https://backstage.io/docs/backend-system/building-backends/migrating#the-auth-plugin
|
|
38
|
-
*/
|
|
39
|
-
type ProviderFactories = {
|
|
40
|
-
[s: string]: AuthProviderFactory$1;
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* @public
|
|
44
|
-
* @deprecated this export will be removed
|
|
45
|
-
*/
|
|
46
|
-
declare function createOriginFilter(config: Config): (origin: string) => boolean;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* @public
|
|
50
|
-
* @deprecated Please migrate to the new backend system as this will be removed in the future.
|
|
51
|
-
*/
|
|
52
|
-
interface RouterOptions {
|
|
53
|
-
logger: LoggerService;
|
|
54
|
-
database: DatabaseService;
|
|
55
|
-
config: RootConfigService;
|
|
56
|
-
discovery: DiscoveryService;
|
|
57
|
-
tokenManager?: TokenManager;
|
|
58
|
-
auth?: AuthService;
|
|
59
|
-
httpAuth?: HttpAuthService;
|
|
60
|
-
tokenFactoryAlgorithm?: string;
|
|
61
|
-
providerFactories?: ProviderFactories;
|
|
62
|
-
disableDefaultProviderFactories?: boolean;
|
|
63
|
-
catalogApi?: CatalogApi;
|
|
64
|
-
ownershipResolver?: AuthOwnershipResolver;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* @public
|
|
68
|
-
* @deprecated Please migrate to the new backend system as this will be removed in the future.
|
|
69
|
-
*/
|
|
70
|
-
declare function createRouter(options: RouterOptions): Promise<express.Router>;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Common options for passport.js-based OAuth providers
|
|
74
|
-
*
|
|
75
|
-
* @public
|
|
76
|
-
* @deprecated No longer in use
|
|
77
|
-
*/
|
|
78
|
-
type OAuthProviderOptions = {
|
|
79
|
-
/**
|
|
80
|
-
* Client ID of the auth provider.
|
|
81
|
-
*/
|
|
82
|
-
clientId: string;
|
|
83
|
-
/**
|
|
84
|
-
* Client Secret of the auth provider.
|
|
85
|
-
*/
|
|
86
|
-
clientSecret: string;
|
|
87
|
-
/**
|
|
88
|
-
* Callback URL to be passed to the auth provider to redirect to after the user signs in.
|
|
89
|
-
*/
|
|
90
|
-
callbackUrl: string;
|
|
91
|
-
};
|
|
92
|
-
/**
|
|
93
|
-
* @public
|
|
94
|
-
* @deprecated Use `OAuthAuthenticatorResult<PassportProfile>` from `@backstage/plugin-auth-node` instead
|
|
95
|
-
*/
|
|
96
|
-
type OAuthResult = {
|
|
97
|
-
fullProfile: Profile;
|
|
98
|
-
params: {
|
|
99
|
-
id_token?: string;
|
|
100
|
-
scope: string;
|
|
101
|
-
token_type?: string;
|
|
102
|
-
expires_in: number;
|
|
103
|
-
};
|
|
104
|
-
accessToken: string;
|
|
105
|
-
refreshToken?: string;
|
|
106
|
-
};
|
|
107
|
-
/**
|
|
108
|
-
* @public
|
|
109
|
-
* @deprecated Use `ClientAuthResponse` from `@backstage/plugin-auth-node` instead
|
|
110
|
-
*/
|
|
111
|
-
type OAuthResponse = {
|
|
112
|
-
profile: ProfileInfo$1;
|
|
113
|
-
providerInfo: OAuthProviderInfo;
|
|
114
|
-
backstageIdentity?: BackstageSignInResult;
|
|
115
|
-
};
|
|
116
|
-
/**
|
|
117
|
-
* @public
|
|
118
|
-
* @deprecated Use `createOAuthRouteHandlers` from `@backstage/plugin-auth-node` instead
|
|
119
|
-
*/
|
|
120
|
-
type OAuthProviderInfo = {
|
|
121
|
-
/**
|
|
122
|
-
* An access token issued for the signed in user.
|
|
123
|
-
*/
|
|
124
|
-
accessToken: string;
|
|
125
|
-
/**
|
|
126
|
-
* (Optional) Id token issued for the signed in user.
|
|
127
|
-
*/
|
|
128
|
-
idToken?: string;
|
|
129
|
-
/**
|
|
130
|
-
* Expiry of the access token in seconds.
|
|
131
|
-
*/
|
|
132
|
-
expiresInSeconds?: number;
|
|
133
|
-
/**
|
|
134
|
-
* Scopes granted for the access token.
|
|
135
|
-
*/
|
|
136
|
-
scope: string;
|
|
137
|
-
};
|
|
138
|
-
/**
|
|
139
|
-
* @public
|
|
140
|
-
* @deprecated import from `@backstage/plugin-auth-node` instead
|
|
141
|
-
*/
|
|
142
|
-
type OAuthState = OAuthState$1;
|
|
143
|
-
/**
|
|
144
|
-
* @public
|
|
145
|
-
* @deprecated Use `createOAuthRouteHandlers` from `@backstage/plugin-auth-node` instead
|
|
146
|
-
*/
|
|
147
|
-
type OAuthStartRequest = express.Request<{}> & {
|
|
148
|
-
scope: string;
|
|
149
|
-
state: OAuthState;
|
|
150
|
-
};
|
|
151
|
-
/**
|
|
152
|
-
* @public
|
|
153
|
-
* @deprecated Use `createOAuthRouteHandlers` from `@backstage/plugin-auth-node` instead
|
|
154
|
-
*/
|
|
155
|
-
type OAuthRefreshRequest = express.Request<{}> & {
|
|
156
|
-
scope: string;
|
|
157
|
-
refreshToken: string;
|
|
158
|
-
};
|
|
159
|
-
/**
|
|
160
|
-
* @public
|
|
161
|
-
* @deprecated Use `createOAuthRouteHandlers` from `@backstage/plugin-auth-node` instead
|
|
162
|
-
*/
|
|
163
|
-
type OAuthLogoutRequest = express.Request<{}> & {
|
|
164
|
-
refreshToken: string;
|
|
165
|
-
};
|
|
166
|
-
/**
|
|
167
|
-
* @public
|
|
168
|
-
* @deprecated Use `createOAuthRouteHandlers` from `@backstage/plugin-auth-node` instead
|
|
169
|
-
*/
|
|
170
|
-
interface OAuthHandlers {
|
|
171
|
-
/**
|
|
172
|
-
* Initiate a sign in request with an auth provider.
|
|
173
|
-
*/
|
|
174
|
-
start(req: OAuthStartRequest): Promise<OAuthStartResponse>;
|
|
175
|
-
/**
|
|
176
|
-
* Handle the redirect from the auth provider when the user has signed in.
|
|
177
|
-
*/
|
|
178
|
-
handler(req: express.Request): Promise<{
|
|
179
|
-
response: OAuthResponse;
|
|
180
|
-
refreshToken?: string;
|
|
181
|
-
}>;
|
|
182
|
-
/**
|
|
183
|
-
* (Optional) Given a refresh token and scope fetches a new access token from the auth provider.
|
|
184
|
-
*/
|
|
185
|
-
refresh?(req: OAuthRefreshRequest): Promise<{
|
|
186
|
-
response: OAuthResponse;
|
|
187
|
-
refreshToken?: string;
|
|
188
|
-
}>;
|
|
189
|
-
/**
|
|
190
|
-
* (Optional) Sign out of the auth provider.
|
|
191
|
-
*/
|
|
192
|
-
logout?(req: OAuthLogoutRequest): Promise<void>;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* @public
|
|
197
|
-
* @deprecated import from `@backstage/plugin-auth-node` instead
|
|
198
|
-
*/
|
|
199
|
-
type AuthResolverCatalogUserQuery = AuthResolverCatalogUserQuery$1;
|
|
200
|
-
/**
|
|
201
|
-
* @public
|
|
202
|
-
* @deprecated import from `@backstage/plugin-auth-node` instead
|
|
203
|
-
*/
|
|
204
|
-
type AuthResolverContext = AuthResolverContext$1;
|
|
205
|
-
/**
|
|
206
|
-
* @public
|
|
207
|
-
* @deprecated import from `@backstage/plugin-auth-node` instead
|
|
208
|
-
*/
|
|
209
|
-
type CookieConfigurer = CookieConfigurer$1;
|
|
210
|
-
/**
|
|
211
|
-
* @public
|
|
212
|
-
* @deprecated Use `createOAuthAuthenticator` from `@backstage/plugin-auth-node` instead
|
|
213
|
-
*/
|
|
214
|
-
type OAuthStartResponse = {
|
|
215
|
-
/**
|
|
216
|
-
* URL to redirect to
|
|
217
|
-
*/
|
|
218
|
-
url: string;
|
|
219
|
-
/**
|
|
220
|
-
* Status code to use for the redirect
|
|
221
|
-
*/
|
|
222
|
-
status?: number;
|
|
223
|
-
};
|
|
224
|
-
/**
|
|
225
|
-
* @public
|
|
226
|
-
* @deprecated import from `@backstage/plugin-auth-node` instead
|
|
227
|
-
*/
|
|
228
|
-
type AuthProviderConfig = AuthProviderConfig$1;
|
|
229
|
-
/**
|
|
230
|
-
* @public
|
|
231
|
-
* @deprecated import from `@backstage/plugin-auth-node` instead
|
|
232
|
-
*/
|
|
233
|
-
type AuthProviderRouteHandlers = AuthProviderRouteHandlers$1;
|
|
234
|
-
/**
|
|
235
|
-
* @public
|
|
236
|
-
* @deprecated import from `@backstage/plugin-auth-node` instead
|
|
237
|
-
*/
|
|
238
|
-
type AuthProviderFactory = AuthProviderFactory$1;
|
|
239
|
-
/**
|
|
240
|
-
* @public
|
|
241
|
-
* @deprecated import `ClientAuthResponse` from `@backstage/plugin-auth-node` instead
|
|
242
|
-
*/
|
|
243
|
-
type AuthResponse<TProviderInfo> = ClientAuthResponse<TProviderInfo>;
|
|
244
|
-
/**
|
|
245
|
-
* @public
|
|
246
|
-
* @deprecated import from `@backstage/plugin-auth-node` instead
|
|
247
|
-
*/
|
|
248
|
-
type ProfileInfo = ProfileInfo$1;
|
|
249
|
-
/**
|
|
250
|
-
* @public
|
|
251
|
-
* @deprecated import from `@backstage/plugin-auth-node` instead
|
|
252
|
-
*/
|
|
253
|
-
type SignInInfo<TAuthResult> = SignInInfo$1<TAuthResult>;
|
|
254
|
-
/**
|
|
255
|
-
* @public
|
|
256
|
-
* @deprecated import from `@backstage/plugin-auth-node` instead
|
|
257
|
-
*/
|
|
258
|
-
type SignInResolver<TAuthResult> = SignInResolver$1<TAuthResult>;
|
|
259
|
-
/**
|
|
260
|
-
* The return type of an authentication handler. Must contain valid profile
|
|
261
|
-
* information.
|
|
262
|
-
*
|
|
263
|
-
* @public
|
|
264
|
-
* @deprecated Use `createOAuthRouteHandlers` from `@backstage/plugin-auth-node` instead
|
|
265
|
-
*/
|
|
266
|
-
type AuthHandlerResult = {
|
|
267
|
-
profile: ProfileInfo$1;
|
|
268
|
-
};
|
|
269
|
-
/**
|
|
270
|
-
* The AuthHandler function is called every time the user authenticates using
|
|
271
|
-
* the provider.
|
|
272
|
-
*
|
|
273
|
-
* The handler should return a profile that represents the session for the user
|
|
274
|
-
* in the frontend.
|
|
275
|
-
*
|
|
276
|
-
* Throwing an error in the function will cause the authentication to fail,
|
|
277
|
-
* making it possible to use this function as a way to limit access to a certain
|
|
278
|
-
* group of users.
|
|
279
|
-
*
|
|
280
|
-
* @public
|
|
281
|
-
* @deprecated Use `createOAuthRouteHandlers` from `@backstage/plugin-auth-node` instead
|
|
282
|
-
*/
|
|
283
|
-
type AuthHandler<TAuthResult> = (input: TAuthResult, context: AuthResolverContext$1) => Promise<AuthHandlerResult>;
|
|
284
|
-
/**
|
|
285
|
-
* @public
|
|
286
|
-
* @deprecated Use `createOAuthRouteHandlers` from `@backstage/plugin-auth-node` instead
|
|
287
|
-
*/
|
|
288
|
-
type StateEncoder = (req: OAuthStartRequest) => Promise<{
|
|
289
|
-
encodedState: string;
|
|
290
|
-
}>;
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* The result of the initial auth challenge. This is the input to the auth
|
|
294
|
-
* callbacks.
|
|
295
|
-
*
|
|
296
|
-
* @public
|
|
297
|
-
* @deprecated import from `@backstage/plugin-auth-backend-module-aws-alb-provider` instead
|
|
298
|
-
*/
|
|
299
|
-
type AwsAlbResult = AwsAlbResult$1;
|
|
300
|
-
|
|
301
|
-
/**
|
|
302
|
-
* @public
|
|
303
|
-
* @deprecated import AzureEasyAuthResult from `@backstage/plugin-auth-backend-module-azure-easyauth-provider` instead
|
|
304
|
-
*/
|
|
305
|
-
type EasyAuthResult = AzureEasyAuthResult;
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
* @public
|
|
309
|
-
* @deprecated import from `@backstage/plugin-auth-node` instead
|
|
310
|
-
*/
|
|
311
|
-
declare const OAuthEnvironmentHandler: typeof OAuthEnvironmentHandler$1;
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* @public
|
|
315
|
-
* @deprecated Use `createOAuthRouteHandlers` from `@backstage/plugin-auth-node` instead
|
|
316
|
-
*/
|
|
317
|
-
type OAuthAdapterOptions = {
|
|
318
|
-
providerId: string;
|
|
319
|
-
persistScopes?: boolean;
|
|
320
|
-
appOrigin: string;
|
|
321
|
-
baseUrl: string;
|
|
322
|
-
cookieConfigurer: CookieConfigurer$1;
|
|
323
|
-
isOriginAllowed: (origin: string) => boolean;
|
|
324
|
-
callbackUrl: string;
|
|
325
|
-
};
|
|
326
|
-
/**
|
|
327
|
-
* @public
|
|
328
|
-
* @deprecated Use `createOAuthRouteHandlers` from `@backstage/plugin-auth-node` instead
|
|
329
|
-
*/
|
|
330
|
-
declare class OAuthAdapter implements AuthProviderRouteHandlers$1 {
|
|
331
|
-
private readonly handlers;
|
|
332
|
-
private readonly options;
|
|
333
|
-
static fromConfig(config: AuthProviderConfig$1, handlers: OAuthHandlers, options: Pick<OAuthAdapterOptions, 'providerId' | 'persistScopes' | 'callbackUrl'>): OAuthAdapter;
|
|
334
|
-
private readonly baseCookieOptions;
|
|
335
|
-
constructor(handlers: OAuthHandlers, options: OAuthAdapterOptions);
|
|
336
|
-
start(req: express.Request, res: express.Response): Promise<void>;
|
|
337
|
-
frameHandler(req: express.Request, res: express.Response): Promise<void>;
|
|
338
|
-
logout(req: express.Request, res: express.Response): Promise<void>;
|
|
339
|
-
refresh(req: express.Request, res: express.Response): Promise<void>;
|
|
340
|
-
/**
|
|
341
|
-
* If the response from the OAuth provider includes a Backstage identity, we
|
|
342
|
-
* make sure it's populated with all the information we can derive from the user ID.
|
|
343
|
-
*/
|
|
344
|
-
private populateIdentity;
|
|
345
|
-
private setNonceCookie;
|
|
346
|
-
private setGrantedScopeCookie;
|
|
347
|
-
private getRefreshTokenFromCookie;
|
|
348
|
-
private getGrantedScopeFromCookie;
|
|
349
|
-
private setRefreshTokenCookie;
|
|
350
|
-
private removeRefreshTokenCookie;
|
|
351
|
-
private getCookieConfig;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
/**
|
|
355
|
-
* @public
|
|
356
|
-
* @deprecated Use `decodeOAuthState` from `@backstage/plugin-auth-node` instead
|
|
357
|
-
*/
|
|
358
|
-
declare const readState: typeof decodeOAuthState;
|
|
359
|
-
/**
|
|
360
|
-
* @public
|
|
361
|
-
* @deprecated Use `encodeOAuthState` from `@backstage/plugin-auth-node` instead
|
|
362
|
-
*/
|
|
363
|
-
declare const encodeState: typeof encodeOAuthState;
|
|
364
|
-
/**
|
|
365
|
-
* @public
|
|
366
|
-
* @deprecated Use inline logic to make sure the session and state nonce matches instead.
|
|
367
|
-
*/
|
|
368
|
-
declare const verifyNonce: (req: express.Request, providerId: string) => void;
|
|
369
|
-
|
|
370
|
-
/**
|
|
371
|
-
* @public
|
|
372
|
-
* @deprecated The Bitbucket auth provider was extracted to `@backstage/plugin-auth-backend-module-bitbucket-provider`.
|
|
373
|
-
*/
|
|
374
|
-
type BitbucketOAuthResult = {
|
|
375
|
-
fullProfile: BitbucketPassportProfile;
|
|
376
|
-
params: {
|
|
377
|
-
id_token?: string;
|
|
378
|
-
scope: string;
|
|
379
|
-
expires_in: number;
|
|
380
|
-
};
|
|
381
|
-
accessToken: string;
|
|
382
|
-
refreshToken?: string;
|
|
383
|
-
};
|
|
384
|
-
/**
|
|
385
|
-
* @public
|
|
386
|
-
* @deprecated The Bitbucket auth provider was extracted to `@backstage/plugin-auth-backend-module-bitbucket-provider`.
|
|
387
|
-
*/
|
|
388
|
-
type BitbucketPassportProfile = Profile & {
|
|
389
|
-
id?: string;
|
|
390
|
-
displayName?: string;
|
|
391
|
-
username?: string;
|
|
392
|
-
avatarUrl?: string;
|
|
393
|
-
_json?: {
|
|
394
|
-
links?: {
|
|
395
|
-
avatar?: {
|
|
396
|
-
href?: string;
|
|
397
|
-
};
|
|
398
|
-
};
|
|
399
|
-
};
|
|
400
|
-
};
|
|
401
|
-
|
|
402
|
-
/**
|
|
403
|
-
* @public
|
|
404
|
-
* @deprecated The Bitbucket Server auth provider was extracted to `@backstage/plugin-auth-backend-module-bitbucket-server-provider`.
|
|
405
|
-
*/
|
|
406
|
-
type BitbucketServerOAuthResult = {
|
|
407
|
-
fullProfile: Profile;
|
|
408
|
-
params: {
|
|
409
|
-
scope: string;
|
|
410
|
-
access_token?: string;
|
|
411
|
-
token_type?: string;
|
|
412
|
-
expires_in?: number;
|
|
413
|
-
};
|
|
414
|
-
accessToken: string;
|
|
415
|
-
refreshToken?: string;
|
|
416
|
-
};
|
|
417
|
-
|
|
418
|
-
/**
|
|
419
|
-
* CloudflareAccessClaims
|
|
420
|
-
*
|
|
421
|
-
* Can be used in externally provided auth handler or sign in resolver to
|
|
422
|
-
* enrich user profile for sign-in user entity
|
|
423
|
-
*
|
|
424
|
-
* @public
|
|
425
|
-
* @deprecated import from `@backstage/plugin-auth-backend-module-cloudflare-access-provider` instead
|
|
426
|
-
*/
|
|
427
|
-
type CloudflareAccessClaims = {
|
|
428
|
-
/**
|
|
429
|
-
* `aud` identifies the application to which the JWT is issued.
|
|
430
|
-
*/
|
|
431
|
-
aud: string[];
|
|
432
|
-
/**
|
|
433
|
-
* `email` contains the email address of the authenticated user.
|
|
434
|
-
*/
|
|
435
|
-
email: string;
|
|
436
|
-
/**
|
|
437
|
-
* iat and exp are the issuance and expiration timestamps.
|
|
438
|
-
*/
|
|
439
|
-
exp: number;
|
|
440
|
-
iat: number;
|
|
441
|
-
/**
|
|
442
|
-
* `nonce` is the session identifier.
|
|
443
|
-
*/
|
|
444
|
-
nonce: string;
|
|
445
|
-
/**
|
|
446
|
-
* `identity_nonce` is available in the Application Token and can be used to
|
|
447
|
-
* query all group membership for a given user.
|
|
448
|
-
*/
|
|
449
|
-
identity_nonce: string;
|
|
450
|
-
/**
|
|
451
|
-
* `sub` contains the identifier of the authenticated user.
|
|
452
|
-
*/
|
|
453
|
-
sub: string;
|
|
454
|
-
/**
|
|
455
|
-
* `iss` the issuer is the application’s Cloudflare Access Domain URL.
|
|
456
|
-
*/
|
|
457
|
-
iss: string;
|
|
458
|
-
/**
|
|
459
|
-
* `custom` contains SAML attributes in the Application Token specified by an
|
|
460
|
-
* administrator in the identity provider configuration.
|
|
461
|
-
*/
|
|
462
|
-
custom: string;
|
|
463
|
-
};
|
|
464
|
-
/**
|
|
465
|
-
* CloudflareAccessGroup
|
|
466
|
-
*
|
|
467
|
-
* @public
|
|
468
|
-
* @deprecated import from `@backstage/plugin-auth-backend-module-cloudflare-access-provider` instead
|
|
469
|
-
*/
|
|
470
|
-
type CloudflareAccessGroup = {
|
|
471
|
-
/**
|
|
472
|
-
* Group id
|
|
473
|
-
*/
|
|
474
|
-
id: string;
|
|
475
|
-
/**
|
|
476
|
-
* Name of group as defined in Cloudflare zero trust dashboard
|
|
477
|
-
*/
|
|
478
|
-
name: string;
|
|
479
|
-
/**
|
|
480
|
-
* Access group email address
|
|
481
|
-
*/
|
|
482
|
-
email: string;
|
|
483
|
-
};
|
|
484
|
-
/**
|
|
485
|
-
* CloudflareAccessIdentityProfile
|
|
486
|
-
*
|
|
487
|
-
* Can be used in externally provided auth handler or sign in resolver to
|
|
488
|
-
* enrich user profile for sign-in user entity
|
|
489
|
-
*
|
|
490
|
-
* @public
|
|
491
|
-
* @deprecated import from `@backstage/plugin-auth-backend-module-cloudflare-access-provider` instead
|
|
492
|
-
*/
|
|
493
|
-
type CloudflareAccessIdentityProfile = {
|
|
494
|
-
id: string;
|
|
495
|
-
name: string;
|
|
496
|
-
email: string;
|
|
497
|
-
groups: CloudflareAccessGroup[];
|
|
498
|
-
};
|
|
499
|
-
/**
|
|
500
|
-
* @public
|
|
501
|
-
* @deprecated import from `@backstage/plugin-auth-backend-module-cloudflare-access-provider` instead
|
|
502
|
-
*/
|
|
503
|
-
type CloudflareAccessResult = {
|
|
504
|
-
claims: CloudflareAccessClaims;
|
|
505
|
-
cfIdentity: CloudflareAccessIdentityProfile;
|
|
506
|
-
expiresInSeconds?: number;
|
|
507
|
-
token: string;
|
|
508
|
-
};
|
|
509
|
-
|
|
510
|
-
/**
|
|
511
|
-
* @public
|
|
512
|
-
* @deprecated Migrate the auth plugin to the new backend system https://backstage.io/docs/backend-system/building-backends/migrating#the-auth-plugin
|
|
513
|
-
*/
|
|
514
|
-
type GithubOAuthResult = {
|
|
515
|
-
fullProfile: Profile;
|
|
516
|
-
params: {
|
|
517
|
-
scope: string;
|
|
518
|
-
expires_in?: string;
|
|
519
|
-
refresh_token_expires_in?: string;
|
|
520
|
-
};
|
|
521
|
-
accessToken: string;
|
|
522
|
-
refreshToken?: string;
|
|
523
|
-
};
|
|
524
|
-
|
|
525
|
-
/**
|
|
526
|
-
* @public
|
|
527
|
-
* @deprecated import from `@backstage/plugin-auth-backend-module-oauth2-proxy-provider` instead
|
|
528
|
-
*/
|
|
529
|
-
type OAuth2ProxyResult = OAuth2ProxyResult$1;
|
|
530
|
-
|
|
531
|
-
/**
|
|
532
|
-
* @public
|
|
533
|
-
* @deprecated Use OidcAuthResult from `@backstage/plugin-auth-backend-module-oidc-provider` instead
|
|
534
|
-
*/
|
|
535
|
-
type OidcAuthResult = OidcAuthResult$1;
|
|
536
|
-
|
|
537
|
-
/**
|
|
538
|
-
* @public
|
|
539
|
-
* @deprecated Migrate the auth plugin to the new backend system https://backstage.io/docs/backend-system/building-backends/migrating#the-auth-plugin
|
|
540
|
-
*/
|
|
541
|
-
type SamlAuthResult = {
|
|
542
|
-
fullProfile: any;
|
|
543
|
-
};
|
|
544
|
-
|
|
545
|
-
/**
|
|
546
|
-
* The data extracted from an IAP token.
|
|
547
|
-
*
|
|
548
|
-
* @public
|
|
549
|
-
* @deprecated import from `@backstage/plugin-auth-backend-module-gcp-iap-provider` instead
|
|
550
|
-
*/
|
|
551
|
-
type GcpIapTokenInfo = GcpIapTokenInfo$1;
|
|
552
|
-
/**
|
|
553
|
-
* The result of the initial auth challenge. This is the input to the auth
|
|
554
|
-
* callbacks.
|
|
555
|
-
*
|
|
556
|
-
* @public
|
|
557
|
-
* @deprecated import from `@backstage/plugin-auth-backend-module-gcp-iap-provider` instead
|
|
558
|
-
*/
|
|
559
|
-
type GcpIapResult = GcpIapResult$1;
|
|
560
|
-
|
|
561
|
-
/**
|
|
562
|
-
* All built-in auth provider integrations.
|
|
563
|
-
*
|
|
564
|
-
* @public
|
|
565
|
-
* @deprecated Migrate the auth plugin to the new backend system https://backstage.io/docs/backend-system/building-backends/migrating#the-auth-plugin
|
|
566
|
-
*/
|
|
567
|
-
declare const providers: Readonly<{
|
|
568
|
-
atlassian: Readonly<{
|
|
569
|
-
create: (options?: {
|
|
570
|
-
authHandler?: AuthHandler<OAuthResult>;
|
|
571
|
-
signIn?: {
|
|
572
|
-
resolver: _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
573
|
-
};
|
|
574
|
-
} | undefined) => AuthProviderFactory$1;
|
|
575
|
-
resolvers: never;
|
|
576
|
-
}>;
|
|
577
|
-
auth0: Readonly<{
|
|
578
|
-
create: (options?: {
|
|
579
|
-
authHandler?: AuthHandler<OAuthResult>;
|
|
580
|
-
signIn?: {
|
|
581
|
-
resolver: _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
582
|
-
};
|
|
583
|
-
} | undefined) => AuthProviderFactory$1;
|
|
584
|
-
resolvers: never;
|
|
585
|
-
}>;
|
|
586
|
-
awsAlb: Readonly<{
|
|
587
|
-
create: (options?: {
|
|
588
|
-
authHandler?: AuthHandler<_backstage_plugin_auth_backend_module_aws_alb_provider.AwsAlbResult>;
|
|
589
|
-
signIn: {
|
|
590
|
-
resolver: _backstage_plugin_auth_node.SignInResolver<_backstage_plugin_auth_backend_module_aws_alb_provider.AwsAlbResult>;
|
|
591
|
-
};
|
|
592
|
-
} | undefined) => AuthProviderFactory$1;
|
|
593
|
-
resolvers: never;
|
|
594
|
-
}>;
|
|
595
|
-
bitbucket: Readonly<{
|
|
596
|
-
create: (options?: {
|
|
597
|
-
authHandler?: AuthHandler<OAuthResult>;
|
|
598
|
-
signIn?: {
|
|
599
|
-
resolver: _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
600
|
-
};
|
|
601
|
-
} | undefined) => AuthProviderFactory$1;
|
|
602
|
-
resolvers: Readonly<{
|
|
603
|
-
userIdMatchingUserEntityAnnotation: () => _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
604
|
-
usernameMatchingUserEntityAnnotation: () => _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
605
|
-
}>;
|
|
606
|
-
}>;
|
|
607
|
-
bitbucketServer: Readonly<{
|
|
608
|
-
create: (options?: {
|
|
609
|
-
authHandler?: AuthHandler<BitbucketServerOAuthResult>;
|
|
610
|
-
signIn?: {
|
|
611
|
-
resolver: _backstage_plugin_auth_node.SignInResolver<BitbucketServerOAuthResult>;
|
|
612
|
-
};
|
|
613
|
-
} | undefined) => AuthProviderFactory$1;
|
|
614
|
-
resolvers: Readonly<{
|
|
615
|
-
emailMatchingUserEntityProfileEmail: () => _backstage_plugin_auth_node.SignInResolver<BitbucketServerOAuthResult>;
|
|
616
|
-
}>;
|
|
617
|
-
}>;
|
|
618
|
-
cfAccess: Readonly<{
|
|
619
|
-
create: (options: {
|
|
620
|
-
authHandler?: AuthHandler<CloudflareAccessResult>;
|
|
621
|
-
signIn: {
|
|
622
|
-
resolver: _backstage_plugin_auth_node.SignInResolver<CloudflareAccessResult>;
|
|
623
|
-
};
|
|
624
|
-
cache?: _backstage_backend_plugin_api.CacheService;
|
|
625
|
-
}) => AuthProviderFactory$1;
|
|
626
|
-
resolvers: Readonly<typeof _backstage_plugin_auth_backend_module_cloudflare_access_provider.cloudflareAccessSignInResolvers>;
|
|
627
|
-
}>;
|
|
628
|
-
gcpIap: Readonly<{
|
|
629
|
-
create: (options: {
|
|
630
|
-
authHandler?: AuthHandler<GcpIapResult>;
|
|
631
|
-
signIn: {
|
|
632
|
-
resolver: _backstage_plugin_auth_node.SignInResolver<GcpIapResult>;
|
|
633
|
-
};
|
|
634
|
-
}) => AuthProviderFactory$1;
|
|
635
|
-
resolvers: never;
|
|
636
|
-
}>;
|
|
637
|
-
github: Readonly<{
|
|
638
|
-
create: (options?: {
|
|
639
|
-
authHandler?: AuthHandler<GithubOAuthResult>;
|
|
640
|
-
signIn?: {
|
|
641
|
-
resolver: _backstage_plugin_auth_node.SignInResolver<GithubOAuthResult>;
|
|
642
|
-
};
|
|
643
|
-
stateEncoder?: StateEncoder;
|
|
644
|
-
} | undefined) => AuthProviderFactory$1;
|
|
645
|
-
resolvers: Readonly<{
|
|
646
|
-
usernameMatchingUserEntityName: () => _backstage_plugin_auth_node.SignInResolver<GithubOAuthResult>;
|
|
647
|
-
}>;
|
|
648
|
-
}>;
|
|
649
|
-
gitlab: Readonly<{
|
|
650
|
-
create: (options?: {
|
|
651
|
-
authHandler?: AuthHandler<OAuthResult>;
|
|
652
|
-
signIn?: {
|
|
653
|
-
resolver: _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
654
|
-
};
|
|
655
|
-
} | undefined) => AuthProviderFactory$1;
|
|
656
|
-
resolvers: never;
|
|
657
|
-
}>;
|
|
658
|
-
google: Readonly<{
|
|
659
|
-
create: (options?: {
|
|
660
|
-
authHandler?: AuthHandler<OAuthResult>;
|
|
661
|
-
signIn?: {
|
|
662
|
-
resolver: _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
663
|
-
};
|
|
664
|
-
} | undefined) => AuthProviderFactory$1;
|
|
665
|
-
resolvers: Readonly<{
|
|
666
|
-
emailMatchingUserEntityProfileEmail: () => _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
667
|
-
emailLocalPartMatchingUserEntityName: () => _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
668
|
-
emailMatchingUserEntityAnnotation: () => _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
669
|
-
}>;
|
|
670
|
-
}>;
|
|
671
|
-
microsoft: Readonly<{
|
|
672
|
-
create: (options?: {
|
|
673
|
-
authHandler?: AuthHandler<OAuthResult>;
|
|
674
|
-
signIn?: {
|
|
675
|
-
resolver: _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
676
|
-
};
|
|
677
|
-
} | undefined) => AuthProviderFactory$1;
|
|
678
|
-
resolvers: Readonly<{
|
|
679
|
-
emailMatchingUserEntityProfileEmail: () => _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
680
|
-
emailLocalPartMatchingUserEntityName: () => _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
681
|
-
userIdMatchingUserEntityAnnotation: () => _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
682
|
-
emailMatchingUserEntityAnnotation: () => _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
683
|
-
}>;
|
|
684
|
-
}>;
|
|
685
|
-
oauth2: Readonly<{
|
|
686
|
-
create: (options?: {
|
|
687
|
-
authHandler?: AuthHandler<OAuthResult>;
|
|
688
|
-
signIn?: {
|
|
689
|
-
resolver: _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
690
|
-
};
|
|
691
|
-
} | undefined) => AuthProviderFactory$1;
|
|
692
|
-
resolvers: never;
|
|
693
|
-
}>;
|
|
694
|
-
oauth2Proxy: Readonly<{
|
|
695
|
-
create: (options: {
|
|
696
|
-
authHandler?: AuthHandler<_backstage_plugin_auth_backend_module_oauth2_proxy_provider.OAuth2ProxyResult>;
|
|
697
|
-
signIn: {
|
|
698
|
-
resolver: _backstage_plugin_auth_node.SignInResolver<_backstage_plugin_auth_backend_module_oauth2_proxy_provider.OAuth2ProxyResult>;
|
|
699
|
-
};
|
|
700
|
-
}) => AuthProviderFactory$1;
|
|
701
|
-
resolvers: never;
|
|
702
|
-
}>;
|
|
703
|
-
oidc: Readonly<{
|
|
704
|
-
create: (options?: {
|
|
705
|
-
authHandler?: AuthHandler<_backstage_plugin_auth_backend_module_oidc_provider.OidcAuthResult>;
|
|
706
|
-
signIn?: {
|
|
707
|
-
resolver: _backstage_plugin_auth_node.SignInResolver<_backstage_plugin_auth_backend_module_oidc_provider.OidcAuthResult>;
|
|
708
|
-
};
|
|
709
|
-
} | undefined) => AuthProviderFactory$1;
|
|
710
|
-
resolvers: Readonly<{
|
|
711
|
-
emailLocalPartMatchingUserEntityName: () => _backstage_plugin_auth_node.SignInResolver<unknown>;
|
|
712
|
-
emailMatchingUserEntityProfileEmail: () => _backstage_plugin_auth_node.SignInResolver<unknown>;
|
|
713
|
-
}>;
|
|
714
|
-
}>;
|
|
715
|
-
okta: Readonly<{
|
|
716
|
-
create: (options?: {
|
|
717
|
-
authHandler?: AuthHandler<OAuthResult>;
|
|
718
|
-
signIn?: {
|
|
719
|
-
resolver: _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
720
|
-
};
|
|
721
|
-
} | undefined) => AuthProviderFactory$1;
|
|
722
|
-
resolvers: Readonly<{
|
|
723
|
-
emailLocalPartMatchingUserEntityName: () => _backstage_plugin_auth_node.SignInResolver<unknown>;
|
|
724
|
-
emailMatchingUserEntityProfileEmail: () => _backstage_plugin_auth_node.SignInResolver<unknown>;
|
|
725
|
-
emailMatchingUserEntityAnnotation(): _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
726
|
-
}>;
|
|
727
|
-
}>;
|
|
728
|
-
onelogin: Readonly<{
|
|
729
|
-
create: (options?: {
|
|
730
|
-
authHandler?: AuthHandler<OAuthResult>;
|
|
731
|
-
signIn?: {
|
|
732
|
-
resolver: _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
|
|
733
|
-
};
|
|
734
|
-
} | undefined) => AuthProviderFactory$1;
|
|
735
|
-
resolvers: never;
|
|
736
|
-
}>;
|
|
737
|
-
saml: Readonly<{
|
|
738
|
-
create: (options?: {
|
|
739
|
-
authHandler?: AuthHandler<SamlAuthResult>;
|
|
740
|
-
signIn?: {
|
|
741
|
-
resolver: _backstage_plugin_auth_node.SignInResolver<SamlAuthResult>;
|
|
742
|
-
};
|
|
743
|
-
} | undefined) => AuthProviderFactory$1;
|
|
744
|
-
resolvers: Readonly<{
|
|
745
|
-
nameIdMatchingUserEntityName(): _backstage_plugin_auth_node.SignInResolver<SamlAuthResult>;
|
|
746
|
-
}>;
|
|
747
|
-
}>;
|
|
748
|
-
easyAuth: Readonly<{
|
|
749
|
-
create: (options?: {
|
|
750
|
-
authHandler?: AuthHandler<_backstage_plugin_auth_backend_module_azure_easyauth_provider.AzureEasyAuthResult>;
|
|
751
|
-
signIn: {
|
|
752
|
-
resolver: _backstage_plugin_auth_node.SignInResolver<_backstage_plugin_auth_backend_module_azure_easyauth_provider.AzureEasyAuthResult>;
|
|
753
|
-
};
|
|
754
|
-
} | undefined) => AuthProviderFactory$1;
|
|
755
|
-
resolvers: never;
|
|
756
|
-
}>;
|
|
757
|
-
}>;
|
|
758
|
-
/**
|
|
759
|
-
* All auth provider factories that are installed by default.
|
|
760
|
-
*
|
|
761
|
-
* @public
|
|
762
|
-
* @deprecated Migrate the auth plugin to the new backend system https://backstage.io/docs/backend-system/building-backends/migrating#the-auth-plugin
|
|
763
|
-
*/
|
|
764
|
-
declare const defaultAuthProviderFactories: {
|
|
765
|
-
[providerId: string]: AuthProviderFactory$1;
|
|
766
|
-
};
|
|
767
|
-
|
|
768
|
-
/**
|
|
769
|
-
* Creates a standardized representation of an integration with a third-party
|
|
770
|
-
* auth provider.
|
|
771
|
-
*
|
|
772
|
-
* The returned object facilitates the creation of provider instances, and
|
|
773
|
-
* supplies built-in sign-in resolvers for the specific provider.
|
|
774
|
-
*
|
|
775
|
-
* @public
|
|
776
|
-
* @deprecated Migrate the auth plugin to the new backend system https://backstage.io/docs/backend-system/building-backends/migrating#the-auth-plugin
|
|
777
|
-
*/
|
|
778
|
-
declare function createAuthProviderIntegration<TCreateOptions extends unknown[], TResolvers extends {
|
|
779
|
-
[name in string]: (...args: any[]) => SignInResolver$1<any>;
|
|
780
|
-
}>(config: {
|
|
781
|
-
create: (...args: TCreateOptions) => AuthProviderFactory$1;
|
|
782
|
-
resolvers?: TResolvers;
|
|
783
|
-
}): Readonly<{
|
|
784
|
-
create: (...args: TCreateOptions) => AuthProviderFactory$1;
|
|
785
|
-
resolvers: Readonly<string extends keyof TResolvers ? never : TResolvers>;
|
|
786
|
-
}>;
|
|
787
|
-
|
|
788
|
-
/**
|
|
789
|
-
* @public
|
|
790
|
-
* @deprecated import from `@backstage/plugin-auth-node` instead
|
|
791
|
-
*/
|
|
792
|
-
declare const prepareBackstageIdentityResponse: typeof prepareBackstageIdentityResponse$1;
|
|
793
|
-
|
|
794
|
-
/**
|
|
795
|
-
* @public
|
|
796
|
-
* @deprecated import from `@backstage/plugin-auth-node` instead
|
|
797
|
-
*/
|
|
798
|
-
type WebMessageResponse = WebMessageResponse$1;
|
|
799
|
-
|
|
800
|
-
/**
|
|
801
|
-
* @public
|
|
802
|
-
* @deprecated Use `sendWebMessageResponse` from `@backstage/plugin-auth-node` instead
|
|
803
|
-
*/
|
|
804
|
-
declare const postMessageResponse: (res: express.Response, appOrigin: string, response: WebMessageResponse) => void;
|
|
805
|
-
/**
|
|
806
|
-
* @public
|
|
807
|
-
* @deprecated Use inline logic to check that the `X-Requested-With` header is set to `'XMLHttpRequest'` instead.
|
|
808
|
-
*/
|
|
809
|
-
declare const ensuresXRequestedWith: (req: express.Request) => boolean;
|
|
810
|
-
|
|
811
|
-
/**
|
|
812
|
-
* A catalog client tailored for reading out identity data from the catalog.
|
|
813
|
-
*
|
|
814
|
-
* @public
|
|
815
|
-
* @deprecated Use the provided `AuthResolverContext` instead, see https://backstage.io/docs/auth/identity-resolver#building-custom-resolvers
|
|
816
|
-
*/
|
|
817
|
-
declare class CatalogIdentityClient {
|
|
818
|
-
private readonly catalogApi;
|
|
819
|
-
private readonly auth;
|
|
820
|
-
constructor(options: {
|
|
821
|
-
catalogApi: CatalogApi;
|
|
822
|
-
tokenManager?: TokenManager;
|
|
823
|
-
discovery: DiscoveryService;
|
|
824
|
-
auth?: AuthService;
|
|
825
|
-
httpAuth?: HttpAuthService;
|
|
826
|
-
});
|
|
827
|
-
/**
|
|
828
|
-
* Looks up a single user using a query.
|
|
829
|
-
*
|
|
830
|
-
* Throws a NotFoundError or ConflictError if 0 or multiple users are found.
|
|
831
|
-
*/
|
|
832
|
-
findUser(query: {
|
|
833
|
-
annotations: Record<string, string>;
|
|
834
|
-
}): Promise<UserEntity>;
|
|
835
|
-
/**
|
|
836
|
-
* Resolve additional entity claims from the catalog, using the passed-in entity names. Designed
|
|
837
|
-
* to be used within a `signInResolver` where additional entity claims might be provided, but
|
|
838
|
-
* group membership and transient group membership lean on imported catalog relations.
|
|
839
|
-
*
|
|
840
|
-
* Returns a superset of the entity names that can be passed directly to `issueToken` as `ent`.
|
|
841
|
-
*/
|
|
842
|
-
resolveCatalogMembership(query: {
|
|
843
|
-
entityRefs: string[];
|
|
844
|
-
logger?: LoggerService;
|
|
845
|
-
}): Promise<string[]>;
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
/**
|
|
849
|
-
* Uses the default ownership resolution logic to return an array
|
|
850
|
-
* of entity refs that the provided entity claims ownership through.
|
|
851
|
-
*
|
|
852
|
-
* A reference to the entity itself will also be included in the returned array.
|
|
853
|
-
*
|
|
854
|
-
* @public
|
|
855
|
-
* @deprecated use `ctx.resolveOwnershipEntityRefs(entity)` from the provided `AuthResolverContext` instead.
|
|
856
|
-
*/
|
|
857
|
-
declare function getDefaultOwnershipEntityRefs(entity: Entity): string[];
|
|
858
|
-
|
|
859
|
-
export { type AuthHandler, type AuthHandlerResult, type AuthProviderConfig, type AuthProviderFactory, type AuthProviderRouteHandlers, type AuthResolverCatalogUserQuery, type AuthResolverContext, type AuthResponse, type AwsAlbResult, type BitbucketOAuthResult, type BitbucketPassportProfile, type BitbucketServerOAuthResult, CatalogIdentityClient, type CloudflareAccessClaims, type CloudflareAccessGroup, type CloudflareAccessIdentityProfile, type CloudflareAccessResult, type CookieConfigurer, type EasyAuthResult, type GcpIapResult, type GcpIapTokenInfo, type GithubOAuthResult, type OAuth2ProxyResult, OAuthAdapter, type OAuthAdapterOptions, OAuthEnvironmentHandler, type OAuthHandlers, type OAuthLogoutRequest, type OAuthProviderInfo, type OAuthProviderOptions, type OAuthRefreshRequest, type OAuthResponse, type OAuthResult, type OAuthStartRequest, type OAuthStartResponse, type OAuthState, type OidcAuthResult, type ProfileInfo, type ProviderFactories, type RouterOptions, type SamlAuthResult, type SignInInfo, type SignInResolver, type StateEncoder, type TokenParams, type WebMessageResponse, createAuthProviderIntegration, createOriginFilter, createRouter, authPlugin as default, defaultAuthProviderFactories, encodeState, ensuresXRequestedWith, getDefaultOwnershipEntityRefs, postMessageResponse, prepareBackstageIdentityResponse, providers, readState, verifyNonce };
|
|
10
|
+
export { authPlugin as default };
|