{"id":13482565,"url":"https://github.com/authlete/java-oauth-server","last_synced_at":"2025-12-29T23:14:56.423Z","repository":{"id":40212852,"uuid":"49413056","full_name":"authlete/java-oauth-server","owner":"authlete","description":"Authorization Server Implementation  in Java supporting OAuth 2.0 \u0026 OpenID Connect","archived":false,"fork":false,"pushed_at":"2025-02-25T06:27:11.000Z","size":640,"stargazers_count":281,"open_issues_count":3,"forks_count":91,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-02-25T07:24:42.926Z","etag":null,"topics":["java","oauth","oauth2","oauth2-server","oidc","oidc-provider","openid-connect","reference-implementation"],"latest_commit_sha":null,"homepage":"https://www.authlete.com/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/authlete.png","metadata":{"files":{"readme":"README.ja.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-11T08:41:26.000Z","updated_at":"2025-02-25T06:27:15.000Z","dependencies_parsed_at":"2023-01-31T11:46:19.813Z","dependency_job_id":"cb8eaa92-7019-4186-88cd-87751917997a","html_url":"https://github.com/authlete/java-oauth-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authlete%2Fjava-oauth-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authlete%2Fjava-oauth-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authlete%2Fjava-oauth-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authlete%2Fjava-oauth-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/authlete","download_url":"https://codeload.github.com/authlete/java-oauth-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245854538,"owners_count":20683373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","oauth","oauth2","oauth2-server","oidc","oidc-provider","openid-connect","reference-implementation"],"created_at":"2024-07-31T17:01:03.303Z","updated_at":"2025-12-29T23:14:56.388Z","avatar_url":"https://github.com/authlete.png","language":"Java","readme":"認可サーバー実装 (Java)\n=======================\n\n概要\n----\n\n[OAuth 2.0][1] と [OpenID Connect][2] をサポートする認可サーバーの Java による実装です。\n\nこの実装は JAX-RS 2.0 API と [authlete-java-jaxrs][3] ライブラリを用いて書かれています。\nJAX-RS は _The Java API for RESTful Web Services_ です。 JAX-RS 2.0 API は\n[JSR 339][4] で標準化され、Java EE 7 に含まれています。 一方、authlete-java-jaxrs\nは、認可サーバーとリソースサーバーを実装するためのユーティリティークラス群を提供するオープンソースライブラリです。\nauthlete-java-jaxrs は [authlete-java-common][5] ライブラリを使用しており、こちらは\n[Authlete Web API][6] とやりとりするためのオープンソースライブラリです。\n\nこの実装は「DB レス」です。 これの意味するところは、認可データ (アクセストークン等)\nや認可サーバー自体の設定、クライアントアプリケーション群の設定を保持するためのデータベースを用意する必要がないということです。\nこれは、[Authlete][7] をバックエンドサービスとして利用することにより実現しています。\n\nこの認可サーバーにより発行されたアクセストークンは、Authlete\nをバックエンドサービスとして利用しているリソースサーバーに対して使うことができます。\n[java-resource-server][40] はそのようなリソースサーバーの実装です。\n保護リソースエンドポイントの実装例を含んでいます。\n\n\nライセンス\n----------\n\n  Apache License, Version 2.0\n\n  `src/main/resources/ekyc-ida` 以下の JSON ファイル群は\n  https://bitbucket.org/openid/ekyc-ida/src/master/examples/response/\n  からコピーしたものです。それらのライセンスについては、OpenID Foundation の\n  eKYC-IDA ワーキンググループにお尋ねください。\n\n\nソースコード\n------------\n\n  \u003ccode\u003ehttps://github.com/authlete/java-oauth-server\u003c/code\u003e\n\n\nAuthlete について\n-----------------\n\n[Authlete][7] (オースリート) は、OAuth 2.0 \u0026 OpenID Connect\nの実装をクラウドで提供するサービスです ([overview][8])。 Authlete\nが提供するデフォルト実装を使うことにより、もしくはこの実装 (java-oauth-server)\nでおこなっているように [Authlete Web API][6]\nを用いて認可サーバーを自分で実装することにより、OAuth 2.0 と OpenID Connect\nの機能を簡単に実現できます。\n\nこの認可サーバーの実装を使うには、Authlete から API\nクレデンシャルズを取得し、`authlete.properties` に設定する必要があります。\nAPI クレデンシャルズを取得する手順はとても簡単です。\n単にアカウントを登録するだけで済みます ([サインアップ][9])。\n詳細は [Getting Started][10] を参照してください。\n\n\n実行方法\n--------\n\n1. この認可サーバーの実装をダウンロードします。\n\n        $ git clone https://github.com/authlete/java-oauth-server.git\n        $ cd java-oauth-server\n\n2. 設定ファイルを編集して API クレデンシャルズをセットします。\n\n        $ vi authlete.properties\n\n3. [maven][42] がインストールされていること、 `JAVA_HOME` が適切に設定されていることを確認します。\n\n4. [http://localhost:8080][38] で認可サーバーを起動します。\n\n        $ mvn jetty:run \u0026\n\n#### Docker を利用する\n\nDocker を利用する場合は, ステップ 2 の後に以下のコマンドを実行してください.\n\n    $ docker-compose up\n\n#### 設定ファイル\n\n`java-oauth-server` は `authlete.properties` を設定ファイルとして参照します。\n他のファイルを使用したい場合は、次のようにそのファイルの名前をシステムプロパティー\n`authlete.configuration.file` で指定してください。\n\n    $ mvn -Dauthlete.configuration.file=local.authlete.properties jetty:run \u0026\n\nエンドポイント\n--------------\n\nこの実装は、下表に示すエンドポイントを公開します。\n\n| エンドポイント                                 | パス                                    |\n|:-----------------------------------------------|:----------------------------------------|\n| 認可エンドポイント                             | `/api/authorization`                    |\n| トークンエンドポイント                         | `/api/token`                            |\n| JWK Set エンドポイント                         | `/api/jwks`                             |\n| ディスカバリーエンドポイント                   | `/.well-known/openid-configuration`     |\n| 取り消しエンドポイント                         | `/api/revocation`                       |\n| イントロスペクションエンドポイント             | `/api/introspection`                    |\n| ユーザー情報エンドポイント                     | `/api/userinfo`                         |\n| 動的クライアント登録エンドポイント             | `/api/register`                         |\n| PAR エンドポイント                             | `/api/par`                              |\n| グラント管理エンドポイント                     | `/api/gm/{grantId}`                     |\n| フェデレーション設定エンドポイント             | `/.well-known/openid-federation`        |\n| フェデレーション登録エンドポイント             | `/api/federation/register`              |\n| クレデンシャルイシュアメタデータエンドポイント | `/.well-known/openid-credential-issuer` |\n| JWT イシュアメタデータエンドポイント           | `/.well-known/jwt-issuer`               |\n\n認可エンドポイントとトークンエンドポイントは、[RFC 6749][1]、[OpenID Connect Core 1.0][13]、\n[OAuth 2.0 Multiple Response Type Encoding Practices][33]、[RFC 7636][14] ([PKCE][15])、\nその他の仕様で説明されているパラメーター群を受け付けます。\n\nJWK Set エンドポイントは、クライアントアプリケーションが (1) この OpenID\nプロバイダーによる署名を検証できるようにするため、また (2) この OpenID\nへのリクエストを暗号化できるようにするため、JSON Web Key Set ドキュメント\n(JWK Set) を公開します。\n\n設定エンドポイントは、この OpenID プロバイダーの設定情報を\n[OpenID Connect Discovery 1.0][35] で定義されている JSON フォーマットで公開します。\n\n取り消しエンドポイントはアクセストークンやリフレッシュトークンを取り消すための\nWeb API です。 その動作は [RFC 7009][21] で定義されています。\n\nイントロスペクションエンドポイントはアクセストークンやリフレッシュトークンの情報を取得するための\nWeb API です。 その動作は [RFC 7662][32] で定義されています。\n\nユーザー情報エンドポイントはユーザーの情報を取得するための Web API です。その動作は\n[OpenID Connect Core 1.0][13] の [Section 5.3. UserInfo Endpoint][41] で定義されています。\n\n動的クライアント登録エンドポイントは、クライアントアプリケーションの登録・更新をおこなうための\nWeb API です。 その動作は [RFC 7591][43] および [RFC 7592][44] で定義されています。\n\nPAR エンドポイントは、認可リクエストを事前に登録し、リクエスト URI の発行を受けるための\nWeb API です。 その動作は [RFC 9126][45] で定義されています。\n\nグラント管理エンドポイントは、グラント ID の情報取得や失効をおこなうための Web API です。\nその動作は [Grant Management for OAuth 2.0][46] で定義されています。\n\nフェデレーション設定エンドポイントは、認可サーバーのエンティティコンフィギュレーションを\nJWT 形式で返す Web API です。その動作は [OpenID Federation 1.0][OIDFED]\nで定義されています。\n\n\n認可リクエストの例\n------------------\n\n次の例は [Implicit フロー][16]を用いて認可エンドポイントからアクセストークンを取得する例です。\n`{クライアントID}` となっているところは、あなたのクライアントアプリケーションの実際のクライアント\nID で置き換えてください。 クライアントアプリケーションについては、[Getting Started][10]\nおよび開発者コンソールの[ドキュメント][17]を参照してください。\n\n    http://localhost:8080/api/authorization?client_id={クライアントID}\u0026response_type=token\n\n上記のリクエストにより、認可ページが表示されます。\n認可ページでは、ログイン情報の入力と、\"Authorize\" ボタン (認可ボタン) もしくは \"Deny\" ボタン\n(拒否ボタン) の押下が求められます。 ログイン情報として、下記のいずれかを使用してください。\n\n\n| ログイン ID | パスワード |\n|:-----------:|:----------:|\n|     john    |    john    |\n|     jane    |    jane    |\n|     max     |    max     |\n|     inga    |    inga    |\n\nもちろんこれらのログイン情報はダミーデータですので、ユーザーデータベースの実装をあなたの実装で置き換える必要があります。\n\nアカウント `max` は [OpenID Connect for Identity Assurance 1.0][IDA] (IDA)\nの古いドラフト用のものです。当アカウントは verified claims を古いフォーマットで保持しています。\nAuthlete 2.2 は古いフォーマットを受け付けますが、Authlete 2.3 以降は拒否します。\n\nアカウント `inga` は IDA 仕様の実装者向けドラフト第三版以降のためのものです。\n最新の IDA 仕様をテストする際は `inga` を利用してください。\nただし、実装者向けドラフト第三版以降がサポートされるのは Authlete 2.3 からということにご留意ください。\n古い Authlete は最新の IDA 仕様はサポートしません。\n\n\nカスタマイズ\n------------\n\nこの実装をカスタマイズする方法については [CUSTOMIZATION.ja.md][39] に記述されています。\nAuthlete はユーザーアカウントを管理しないので、基本的には「ユーザー認証」に関わる部分についてプログラミングが必要となります。\nこれは設計によるものです。 ユーザー認証の仕組みを実装済みの既存の Web\nサービスにもスムーズに OAuth 2.0 と OpenID Connect の機能を組み込めるようにするため、Authlete\nのアーキテクチャーは認証と認可を慎重に分離しています。\n\n\n実装に関する注意\n----------------\n\nこの実装では、認可ページを実装するために `Viewable` クラスを使用しています。\nこのクラスは [Jersey][18] (JAX-RS の参照実装) に含まれているものですが、JAX-RS\n2.0 API の一部ではありません。\n\n\n関連仕様\n--------\n\n- [RFC 6749][1] - The OAuth 2.0 Authorization Framework\n- [RFC 6750][19] - The OAuth 2.0 Authorization Framework: Bearer Token Usage\n- [RFC 6819][20] - OAuth 2.0 Threat Model and Security Considerations\n- [RFC 7009][21] - OAuth 2.0 Token Revocation\n- [RFC 7033][22] - WebFinger\n- [RFC 7515][23] - JSON Web Signature (JWS)\n- [RFC 7516][24] - JSON Web Encryption (JWE)\n- [RFC 7517][25] - JSON Web Key (JWK)\n- [RFC 7518][26] - JSON Web Algorithms (JWA)\n- [RFC 7519][27] - JSON Web Token (JWT)\n- [RFC 7521][28] - Assertion Framework for OAuth 2.0 Client Authentication and Authorization Grants\n- [RFC 7522][29] - Security Assertion Markup Language (SAML) 2.0 Profile for OAuth 2.0 Client Authentication and Authorization Grants\n- [RFC 7523][30] - JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants\n- [RFC 7591][43] - OAuth 2.0 Dynamic Client Registration Protocol\n- [RFC 7592][44] - OAuth 2.0 Dynamic Client Registration Management Protocol\n- [RFC 7636][31] - Proof Key for Code Exchange by OAuth Public Clients\n- [RFC 7662][32] - OAuth 2.0 Token Introspection\n- [RFC 9126][45] - OAuth 2.0 Pushed Authorization Requests\n- [OAuth 2.0 Multiple Response Type Encoding Practices][33]\n- [OAuth 2.0 Form Post Response Mode][34]\n- [OpenID Connect Core 1.0][13]\n- [OpenID Connect Discovery 1.0][35]\n- [OpenID Connect Dynamic Client Registration 1.0][36]\n- [OpenID Connect Session Management 1.0][37]\n\n\nその他の情報\n------------\n\n- [Authlete][7] - Authlete ホームページ\n- [authlete-java-common][5] - Java 用 Authlete 共通ライブラリ\n- [authlete-java-jaxrs][3] - JAX-RS (Java) 用 Authlete ライブラリ\n- [java-resource-server][40] - リソースサーバーの実装\n\n\nコンタクト\n----------\n\n| 目的 | メールアドレス       |\n|:-----|:---------------------|\n| 一般 | info@authlete.com    |\n| 営業 | sales@authlete.com   |\n| 広報 | pr@authlete.com      |\n| 技術 | support@authlete.com |\n\n\n[1]: https://www.rfc-editor.org/rfc/rfc6749.html\n[2]: https://openid.net/connect/\n[3]: https://github.com/authlete/authlete-java-jaxrs\n[4]: https://jcp.org/en/jsr/detail?id=339\n[5]: https://github.com/authlete/authlete-java-common\n[6]: https://docs.authlete.com/\n[7]: https://www.authlete.com/\n[8]: https://www.authlete.com/ja/developers/overview/\n[9]: https://so.authlete.com/accounts/signup\n[10]: https://www.authlete.com/ja/developers/getting_started/\n[11]: https://www.rfc-editor.org/rfc/rfc6749.html#section-3.1\n[12]: https://www.rfc-editor.org/rfc/rfc6749.html#section-3.2\n[13]: https://openid.net/specs/openid-connect-core-1_0.html\n[14]: https://www.rfc-editor.org/rfc/rfc7636.html\n[15]: https://www.authlete.com/ja/developers/pkce/\n[16]: https://www.rfc-editor.org/rfc/rfc6749.html#section-4.2\n[17]: https://www.authlete.com/ja/developers/cd_console/\n[18]: https://jersey.java.net/\n[19]: https://www.rfc-editor.org/rfc/rfc6750.html\n[20]: https://www.rfc-editor.org/rfc/rfc6819.html\n[21]: https://www.rfc-editor.org/rfc/rfc7009.html\n[22]: https://www.rfc-editor.org/rfc/rfc7033.html\n[23]: https://www.rfc-editor.org/rfc/rfc7515.html\n[24]: https://www.rfc-editor.org/rfc/rfc7516.html\n[25]: https://www.rfc-editor.org/rfc/rfc7517.html\n[26]: https://www.rfc-editor.org/rfc/rfc7518.html\n[27]: https://www.rfc-editor.org/rfc/rfc7519.html\n[28]: https://www.rfc-editor.org/rfc/rfc7521.html\n[29]: https://www.rfc-editor.org/rfc/rfc7522.html\n[30]: https://www.rfc-editor.org/rfc/rfc7523.html\n[31]: https://www.rfc-editor.org/rfc/rfc7636.html\n[32]: https://www.rfc-editor.org/rfc/rfc7662.html\n[33]: https://openid.net/specs/oauth-v2-multiple-response-types-1_0.html\n[34]: https://openid.net/specs/oauth-v2-form-post-response-mode-1_0.html\n[35]: https://openid.net/specs/openid-connect-discovery-1_0.html\n[36]: https://openid.net/specs/openid-connect-registration-1_0.html\n[37]: https://openid.net/specs/openid-connect-session-1_0.html\n[38]: http://localhost:8080\n[39]: doc/CUSTOMIZATION.ja.md\n[40]: https://github.com/authlete/java-resource-server\n[41]: https://openid.net/specs/openid-connect-core-1_0.html#UserInfo\n[42]: https://maven.apache.org/\n[43]: https://www.rfc-editor.org/rfc/rfc7591.html\n[44]: https://www.rfc-editor.org/rfc/rfc7592.html\n[45]: https://www.rfc-editor.org/rfc/rfc9126.html\n[46]: https://openid.net/specs/fapi-grant-management.html\n[IDA]: https://openid.net/specs/openid-connect-4-identity-assurance-1_0.html\n[OIDFED]: https://openid.net/specs/openid-federation-1_0.html\n\n","funding_links":[],"categories":["Java","Repositories 📦","安全"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauthlete%2Fjava-oauth-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fauthlete%2Fjava-oauth-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauthlete%2Fjava-oauth-server/lists"}