-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* dresscaサンプルのコピー * batchの削除 * サンプルアプリの結合 * 変数名の変更 * backend側がazure-ad-b2cの設定を認識するよう構築 * openapi-generatorの設定適用 * レスポンスを返すdtoクラスの作成 * backendのクラス名の変更およびそれに応じたjsonファイルの変更 * frontendのサンプルアプリ反映(プッシュ用) * api-docsの変更に基づく修正 * 環境変数の値を読み込むように修正および変数名の変更 * msalの初期化メソッドの追加 * ログイン後Backend側でUserIdの取得を行うプログラムの作成 * intercepter呼び出しエラーへの対応が必要 * interceptorでAPI呼び出し時にheaderにtokenを付与する * UserControllerのRequestHeaderの削除 * フィルターによるthreadContextの保存 * maris側の認証プログラムに統一 * 買い物かご上でのログイン処理実行プロセスの追加 * バックエンド側ファイルの削除・移動 * backend側の不要なプログラムの削除およびそれに伴うプログラムの修正 * フロントエンド側の不必要なファイル削除およびそれに伴うプログラムの修正 * router-linkが付与されたテキスト・画像について修正 * ドキュメント追加 * 不要なライブラリの削除 * azure関係ライブラリのバージョン更新 * Cypressを削除 * mockを削除 * backendのライブラリに関するリンクを追加 * tailwind.cssとbase.cssを削除 * 不要なファイルを削除 * フォルダ削除に伴うimportの削除およびguardの削除 * authentication.tsのgetUserIdを削除 * interceptorsをconfigを用いたheaderの設定に変更 * ドキュメントの修正 * ドキュメントを参照するためのリンク設定 * mkdocsのインデント修正 * Github Actionsおよびdependabotのパイプライン追加 * TypeCheckへの対応 * パイプラインの修正 * yamllintへの対応 * パイプラインの遷移先フォルダの修正 * パイプラインエラーの修正 * working-directoryを環境変数を参照するように変更 * backendの実行権限付与のエラー対応 * npm installの変更 * JUnitのテストをciから除外 * lintの修正 * JUnitに関するsteps内容の削除およびコメントの修正 * dependabotの修正 * ドキュメントの指摘事項に関する修正 * textlintとMarisドキュメント対応 * 環境変数の修正 * 不要なフォルダー・ファイル・ライブラリの削除 * jsonに関係するファイル(依存関係やAPI仕様)の修正 * UserControllerのテスト作成 * 認証なしで現在時刻を取得する機能の実装 * 認証機能なしの Web APIを追加したことによるドキュメント修正・追記 * ユーザーフローの名前をプレースホルダーに変更 * textlintの修正 * gradlew buildによるワークフローに修正 * パイプラインの修正 * npm install を強制実行 * Revert "npm install を強制実行" This reverts commit a441696. * 参照記事の追加とコードブロックのインデント追加 * 未認証時のエラーをコントローラーのアノテーションで実行するよう変更 * Maris側のフロントエンドの適用をMaia側へ反映、それに合わせたバックエンドの変更 * vite5への更新 * throwするExceptionの修正 * バックエンド・フロントエンドの実装方針変更に伴うドキュメントの修正 * Web API の URL を変更 * ドキュメントに空白を追加 * Update documents/contents/samples/azure-ad-b2c/index.md Co-authored-by: tsuna-can-se <61451753+tsuna-can-se@users.noreply.github.com> * textlintによる文字数オーバーのエラーに対する修正 * 利用していないimport文の削除 * 承認コードフローのドキュメント追加 * バックエンドのOSSバージョンアップ * フロントエンド側ライブラリの更新 * typescriptのバージョン変更 * eslint-config-typescriptのバージョン変更 * msalのバージョンアップ * 認証のドキュメントに関する記載を修正 * idTokenの削除 * Obsoleteされたメソッドを推奨メソッドへ変更 * ドキュメントの修正 * NodeとVisual Studio Codeのバージョン記載 * ドキュメントの修正 --------- Co-authored-by: Kaori ISHIKAWA <kaori.ishikawa@biprogy.com> Co-authored-by: tsuna-can-se <61451753+tsuna-can-se@users.noreply.github.com>
- Loading branch information
1 parent
76c5223
commit 94c50f6
Showing
113 changed files
with
11,737 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# cSpell:ignore mikepenz dorny | ||
name: azure-ad-b2c-sample CI | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- 'samples/azure-ad-b2c-sample/**' | ||
- '.github/workflows/samples-azure-ad-b2c-ci.yml' | ||
workflow_dispatch: | ||
|
||
env: | ||
BACKEND_WORKING_DIRECTORY: samples/azure-ad-b2c-sample/auth-backend | ||
FRONTEND_WORKING_DIRECTORY: samples/azure-ad-b2c-sample/auth-frontend | ||
|
||
jobs: | ||
build-frontend: | ||
name: 'フロントエンドアプリケーションのビルド' | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
defaults: | ||
run: | ||
working-directory: ${{ env.FRONTEND_WORKING_DIRECTORY }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- uses: actions/cache@v4 | ||
id: node_modules_cache_id | ||
env: | ||
cache-name: cache-node-modules-azure-ad-b2c-auth-frontend | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
- run: echo '${{ toJSON(steps.node_modules_cache_id.outputs) }}' | ||
- name: node パッケージのインストール | ||
run: npm install | ||
if: ${{ steps.node_modules_cache_id.outputs.cache-hit != 'true' }} | ||
- name: TypeScript の型チェック | ||
run: npm run typecheck | ||
|
||
build-backend: | ||
name: 'バックエンドアプリケーションのビルド' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
checks: write | ||
contents: read | ||
pull-requests: write | ||
defaults: | ||
run: | ||
working-directory: ${{ env.BACKEND_WORKING_DIRECTORY }} | ||
|
||
steps: | ||
- name: ブランチのチェックアウト | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: JDK17のセットアップ | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '17' | ||
cache: 'gradle' | ||
|
||
- name: gradlewに実行権限付与 | ||
run: chmod +x ./gradlew | ||
|
||
- id: run-build-and-tests | ||
name: ビルド(コンパイル, 静的テスト, JUnit)実行 | ||
run: ./gradlew build > build-result.txt | ||
continue-on-error: true | ||
|
||
- name: ビルド(コンパイル, 静的テスト, JUnit)結果の表示 | ||
shell: bash | ||
if: ${{ success() || (failure() && steps.run-build-and-tests.outcome == 'failure') }} | ||
run: | | ||
echo '# Build Result :gear:' >> $GITHUB_STEP_SUMMARY | ||
echo '```' >> $GITHUB_STEP_SUMMARY | ||
cat build-result.txt >> $GITHUB_STEP_SUMMARY | ||
echo '```' >> $GITHUB_STEP_SUMMARY | ||
- name: ビルド(コンパイル, 静的テスト, JUnit)成功 | ||
if: ${{ steps.run-build-and-tests.outcome == 'success' }} | ||
run: | | ||
echo '## Test Result :memo:' >> $GITHUB_STEP_SUMMARY | ||
echo ':heavy_check_mark: コンパイルと静的テストに成功しました。' >> $GITHUB_STEP_SUMMARY | ||
- name: ビルド(コンパイル, 静的テスト, JUnit)失敗 | ||
if: ${{ steps.run-build-and-tests.outcome == 'failure' }} | ||
run: | | ||
echo '## Test Result :memo:' >> $GITHUB_STEP_SUMMARY | ||
echo ':x: コンパイルまたは静的テストに失敗しました。' >> $GITHUB_STEP_SUMMARY | ||
- name: JUnitレポート | ||
uses: mikepenz/action-junit-report@v4 | ||
with: | ||
report_paths: '**/build/test-results/test/TEST-*.xml' | ||
|
||
- name: Report | ||
uses: dorny/test-reporter@v1 | ||
if: always() | ||
with: | ||
name: Maven Tests | ||
path: '**/build/test-results/test/TEST-*.xml' | ||
reporter: java-junit | ||
fail-on-error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,7 @@ | |
"利用", | ||
"ルール", | ||
"ログ" | ||
|
||
], | ||
"preferWords": [ | ||
"インターフェース", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
title: Azure AD B2C を利用してユーザーを認証する | ||
description: Azure AD B2C による認証を利用するためのサンプルと、その使い方を解説します。 | ||
--- | ||
|
||
# Azure AD B2C による認証を利用する {#top} | ||
|
||
## 概要 {#about-this-sample} | ||
|
||
Azure AD B2C を利用したユーザー認証の簡単な実装サンプルを提供します。 | ||
|
||
本サンプルは、クライアントサイドレンダリングアプリケーションにおいて Azure AD B2C を利用する場合のコード例として利用できます。 | ||
また、 SPA アプリケーション( AlesInfiny Maia OSS Edition(以降、 AlesInfiny Maia )のアーキテクチャに準拠したアプリケーション)に本サンプルのファイルやコードをコピーしてください。 | ||
これにより、 SPA アプリケーションに Azure AD B2C を利用したユーザー認証機能を組み込めます。 | ||
|
||
## 本サンプルを利用するための前提 {#prerequisites} | ||
|
||
本サンプルを動作させるためには、以下が必要です。 | ||
|
||
- Azure サブスクリプション | ||
- サブスクリプション内、またはサブスクリプション内のリソース グループ内で共同作成者以上のロールが割り当てられている Azure アカウント | ||
|
||
## 本サンプルを利用する前の準備 {#preparations} | ||
|
||
本サンプルを動作させるまでの流れは以下のとおりです。 | ||
|
||
1. Azure AD B2C テナントを作成する | ||
1. Azure AD B2C テナントを利用するアプリを登録する | ||
1. ユーザーフローを作成する | ||
1. 本サンプルの設定ファイルに各手順で作成した設定内容を記入する | ||
1. 本サンプルを動作させる | ||
|
||
具体的な手順は、[サンプルアプリケーション](#download) に付属する README.md を参照してください。 | ||
|
||
## 本サンプルで利用する OSS {#oss-libraries} | ||
|
||
本サンプルでは以下の OSS ライブラリを使用しています。 | ||
他の OSS ライブラリについては、 [サンプルアプリケーションをダウンロード](#download) して確認してください。 | ||
|
||
- フロントエンド | ||
- [MSAL.js](https://www.npmjs.com/package/@azure/msal-browser) | ||
- バックエンド | ||
- [spring-cloud-azure-starter](https://central.sonatype.com/artifact/com.azure.spring/spring-cloud-azure-starter) | ||
- [spring-cloud-azure-starter-active-directory-b2c](https://central.sonatype.com/artifact/com.azure.spring/spring-cloud-azure-starter-active-directory-b2c) | ||
- [spring-cloud-azure-dependencies](https://central.sonatype.com/artifact/com.azure.spring/spring-cloud-azure-dependencies) | ||
|
||
## ダウンロード {#download} | ||
|
||
サンプルアプリケーションと詳細な解説は以下からダウンロードできます。 | ||
|
||
- [サンプルアプリケーションのダウンロード](../downloads/azure-ad-b2c.zip) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.