Skip to content

Commit

Permalink
Refactor auth-backend azure-easyauth provider
Browse files Browse the repository at this point in the history
Signed-off-by: YAEGASHI Takeshi <yaegashi@gmail.com>
  • Loading branch information
yaegashi committed Apr 11, 2024
1 parent eb627c5 commit c256af7
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 449 deletions.
12 changes: 5 additions & 7 deletions plugins/auth-backend/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { AuthResolverCatalogUserQuery as AuthResolverCatalogUserQuery_2 } from '
import { AuthResolverContext as AuthResolverContext_2 } from '@backstage/plugin-auth-node';
import { AuthService } from '@backstage/backend-plugin-api';
import { AwsAlbResult as AwsAlbResult_2 } from '@backstage/plugin-auth-backend-module-aws-alb-provider';
import { AzureEasyAuthResult } from '@backstage/plugin-auth-backend-module-azure-easyauth-provider';
import { BackendFeature } from '@backstage/backend-plugin-api';
import { BackstageSignInResult } from '@backstage/plugin-auth-node';
import { CacheService } from '@backstage/backend-plugin-api';
Expand Down Expand Up @@ -198,11 +199,8 @@ export const defaultAuthProviderFactories: {
[providerId: string]: AuthProviderFactory_2;
};

// @public (undocumented)
export type EasyAuthResult = {
fullProfile: Profile;
accessToken?: string;
};
// @public @deprecated (undocumented)
export type EasyAuthResult = AzureEasyAuthResult;

// @public @deprecated (undocumented)
export const encodeState: typeof encodeOAuthState;
Expand Down Expand Up @@ -635,9 +633,9 @@ export const providers: Readonly<{
create: (
options?:
| {
authHandler?: AuthHandler<EasyAuthResult> | undefined;
authHandler?: AuthHandler<AzureEasyAuthResult> | undefined;
signIn: {
resolver: SignInResolver_2<EasyAuthResult>;
resolver: SignInResolver_2<AzureEasyAuthResult>;
};
}
| undefined,
Expand Down
1 change: 1 addition & 0 deletions plugins/auth-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"@backstage/errors": "workspace:^",
"@backstage/plugin-auth-backend-module-atlassian-provider": "workspace:^",
"@backstage/plugin-auth-backend-module-aws-alb-provider": "workspace:^",
"@backstage/plugin-auth-backend-module-azure-easyauth-provider": "workspace:^",
"@backstage/plugin-auth-backend-module-gcp-iap-provider": "workspace:^",
"@backstage/plugin-auth-backend-module-github-provider": "workspace:^",
"@backstage/plugin-auth-backend-module-gitlab-provider": "workspace:^",
Expand Down
8 changes: 7 additions & 1 deletion plugins/auth-backend/src/providers/azure-easyauth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@
*/

export { easyAuth } from './provider';
export type { EasyAuthResult } from './provider';
import { AzureEasyAuthResult } from '@backstage/plugin-auth-backend-module-azure-easyauth-provider';

/**
* @public
* @deprecated import AzureEasyAuthResult from `@backstage/plugin-auth-backend-module-azure-easyauth-provider` instead
*/
export type EasyAuthResult = AzureEasyAuthResult;
293 changes: 0 additions & 293 deletions plugins/auth-backend/src/providers/azure-easyauth/provider.test.ts

This file was deleted.

0 comments on commit c256af7

Please sign in to comment.