@@ -128,9 +128,6 @@ export type AwsAlbProviderOptions = {
|
||||
};
|
||||
};
|
||||
|
||||
// @public @deprecated
|
||||
export type BackstageIdentity = BackstageSignInResult;
|
||||
|
||||
// Warning: (ae-missing-release-tag) "BitbucketOAuthResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
|
||||
@@ -48,6 +48,6 @@ export type {
|
||||
|
||||
// These types are needed for a postMessage from the login pop-up
|
||||
// to the frontend
|
||||
export type { AuthResponse, BackstageIdentity, ProfileInfo } from './types';
|
||||
export type { AuthResponse, ProfileInfo } from './types';
|
||||
|
||||
export { prepareBackstageIdentityResponse } from './prepareBackstageIdentityResponse';
|
||||
|
||||
@@ -164,14 +164,6 @@ export type AuthResponse<ProviderInfo> = {
|
||||
backstageIdentity?: BackstageIdentityResponse;
|
||||
};
|
||||
|
||||
/**
|
||||
* The old exported symbol for {@link @backstage/plugin-auth-node#BackstageSignInResult}.
|
||||
*
|
||||
* @public
|
||||
* @deprecated Use the {@link @backstage/plugin-auth-node#BackstageSignInResult} instead.
|
||||
*/
|
||||
export type BackstageIdentity = BackstageSignInResult;
|
||||
|
||||
/**
|
||||
* Used to display login information to user, i.e. sidebar popup.
|
||||
*
|
||||
|
||||
@@ -34,7 +34,10 @@ export function getBearerTokenFromAuthorizationHeader(
|
||||
|
||||
// @public
|
||||
export class IdentityClient {
|
||||
constructor(options: { discovery: PluginEndpointDiscovery; issuer: string });
|
||||
authenticate(token: string | undefined): Promise<BackstageIdentityResponse>;
|
||||
static create(options: {
|
||||
discovery: PluginEndpointDiscovery;
|
||||
issuer: string;
|
||||
}): IdentityClient;
|
||||
}
|
||||
```
|
||||
|
||||
@@ -98,7 +98,7 @@ describe('IdentityClient', () => {
|
||||
afterEach(() => server.resetHandlers());
|
||||
|
||||
beforeEach(() => {
|
||||
client = new IdentityClient({ discovery, issuer: mockBaseUrl });
|
||||
client = IdentityClient.create({ discovery, issuer: mockBaseUrl });
|
||||
factory = new FakeTokenFactory({
|
||||
issuer: mockBaseUrl,
|
||||
keyDurationSeconds,
|
||||
|
||||
@@ -35,7 +35,20 @@ export class IdentityClient {
|
||||
private keyStore: JWKS.KeyStore;
|
||||
private keyStoreUpdated: number;
|
||||
|
||||
constructor(options: { discovery: PluginEndpointDiscovery; issuer: string }) {
|
||||
/**
|
||||
* Create a new {@link IdentityClient} instance.
|
||||
*/
|
||||
static create(options: {
|
||||
discovery: PluginEndpointDiscovery;
|
||||
issuer: string;
|
||||
}): IdentityClient {
|
||||
return new IdentityClient(options);
|
||||
}
|
||||
|
||||
private constructor(options: {
|
||||
discovery: PluginEndpointDiscovery;
|
||||
issuer: string;
|
||||
}) {
|
||||
this.discovery = options.discovery;
|
||||
this.issuer = options.issuer;
|
||||
this.keyStore = new JWKS.KeyStore();
|
||||
|
||||
Reference in New Issue
Block a user