{"id":32122032,"url":"https://github.com/authlete/authlete-deno","last_synced_at":"2026-02-21T19:34:15.258Z","repository":{"id":36954933,"uuid":"274951275","full_name":"authlete/authlete-deno","owner":"authlete","description":"Authlete Library for Deno","archived":false,"fork":false,"pushed_at":"2023-09-27T07:18:22.000Z","size":328,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-10-20T20:12:00.401Z","etag":null,"topics":["deno","javascript","library","oauth","oauth2","oidc","openid-connect","typescript"],"latest_commit_sha":null,"homepage":"https://www.authlete.com/","language":"TypeScript","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":"CHANGES.ja.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-25T15:28:13.000Z","updated_at":"2024-07-01T11:19:53.000Z","dependencies_parsed_at":"2022-08-24T21:00:52.142Z","dependency_job_id":null,"html_url":"https://github.com/authlete/authlete-deno","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/authlete/authlete-deno","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authlete%2Fauthlete-deno","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authlete%2Fauthlete-deno/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authlete%2Fauthlete-deno/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authlete%2Fauthlete-deno/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/authlete","download_url":"https://codeload.github.com/authlete/authlete-deno/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authlete%2Fauthlete-deno/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29691045,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T18:18:25.093Z","status":"ssl_error","status_checked_at":"2026-02-21T18:18:22.435Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["deno","javascript","library","oauth","oauth2","oidc","openid-connect","typescript"],"created_at":"2025-10-20T20:07:56.591Z","updated_at":"2026-02-21T19:34:15.252Z","avatar_url":"https://github.com/authlete.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Authlete Library for Deno\n================================\n\n概要\n----\n\n[Authlete Web API][AuthleteAPI] のための Deno ライブラリです。\n\nライセンス\n---------\n\n  Apache License, Version 2.0\n\nソースコード\n-----------\n\n  `https://github.com/authlete/authlete-deno`\n\nDeno Land\n---------\n\n  `https://deno.land/x/authlete_deno`\n\n前提条件\n-------\n\nこのライブラリを利用するためには、以下の要件が必須となります。\n\n- Authlete にサインアップ済みであること。詳細は[こちら][AuthleteGettingStarted]をご覧ください。\n\n- `tsconfig.json` ファイル内の `experimentalDecorators` オプションと `emitDecoratorMetadata`\nオプションの値を `true` に設定すること。\n\n- `deno run` コマンド実行時に `--allow-net` オプションと `--allow-read` オプションを付与すること。\n\nクイックスタート\n---------------\n\n**Step 1**: モジュールをインポート。\n\n```ts\nimport { AuthleteApiFactory } from 'https://deno.land/x/authlete_deno@v1.2.10/mod.ts';\n```\n\n**Step 2**: `AuthleteApi` のインスタンスを初期化。\n\n```ts\n// configuration 用のオブジェクトを作成。\n// 注意: 以下のクレデンシャルは自身のものに置き換えること。\nconst config = {\n    baseUrl:               'https://api.authlete.com/api',\n    serviceOwnerApiKey:    'YOUR_SERVICE_OWNER_API_KEY',\n    serviceOwnerApiSecret: 'YOUR_SERVICE_OWNER_API_SECRET',\n    serviceApiKey:         'YOUR_SERVICE_API_KEY',\n    serviceApiSecret:      'YOUR_SERVICE_API_SECRET',\n    timeout:               10000\n};\n\n// AuthleteApi のインスタンスを作成。\nconst api = await AuthleteApiFactory.create(config);\n```\n\n**Step 3**: AuthleteApi のメソッドを呼び出して Authlete API にアクセス。\n\n**例 1**: サービス群を取得。\n\n```ts\n// サービス群を取得する。\n// 以下のコードは Authlete の '/service/get/list' API をコールする。\nconst response: ServiceListResponse = await api.getServiceList();\n\n// 各サービスの情報を出力。\nfor (const service of response.services)\n{\n    console.log(service);\n}\n```\n\n**例 2**: クライアントアプリケーションを新規作成。\n\n```ts\n// Client オブジェクトを新規作成。\nconst request = new Client();\n\n// いくつかのプロパティを設定。\nrequest.clientName  = 'My Client';\nrequest.description = 'This is my client.';\n\n// 新規クライアントアプリケーションを Authlete 上に登録。\n// 以下のコードは Authlete の '/client/create' API をコールする。\nconst response: Client = await api.createClient(request);\n\n// 作成したクライアントアプリケーションの情報を出力。\nconsole.log(response);\n```\n\n説明\n----\n\n#### AuthleteApi の取得方法\n\n[Authlete Web API][AuthleteAPI] とやりとりするメソッドは全て `AuthleteApi`\nインターフェースに集められています。`AuthleteApi` インターフェースの実装クラスとして、\nこのライブラリは `AuthleteApiImpl` クラスを提供しています。 `AuthleteApiImpl`\nクラスのインスタンスを取得する方法は以下のようになります。\n\n**方法 1**: `AuthleteApiImpl` クラスのコンストラクターを利用する。\n\n```ts\n// configuration 用のオブジェクトを作成。\nconst config: AuthleteConfiguration = { ... };\n\n// AuthleteApiImpl クラスのインスタンスを作成。\nconst api: AuthleteApi = new AuthleteApiImpl(config);\n```\n\n**方法 2**: `AuthleteApiFactory` クラスの `create()` メソッドを利用する。\n\n```ts\n// configuration 用のオブジェクトを作成。\nconst config: AuthleteConfiguration = { ... };\n\n// AuthleteApiImpl クラスのインスタンスを作成。\nconst api = await AuthleteApiFactory.create(config);\n```\n\n**方法 3**: `AuthleteApiFactory` クラスの `getDefault()` メソッドを利用する。\n\n```ts\n// AuthleteApiImpl クラスのデフォルトインスタンスを取得。\nconst api = await AuthleteApiFactory.getDefault();\n```\n\n_注意: `AuthleteApiFactory` クラスの `getDefault()` メソッドが初めて呼び出されると、\n実行ディレクトリ直下にある設定ファイル (`authlete.json`) がロードされ、その設定内容を用いて\n`AuthleteApiImpl` クラスがインスタンス化されます。作成されたインスタンスは内部的にキャッシュされるため、\n当該メソッドに対する以降のメソッドコールは、そのキャッシュを返却するのみとなります。_\n\n#### AuthleteConfiguration\n\n`AuthleteApi` インスタンスの設定を行うには、主に二つの方法があります。\n\n**方法 1**: `AuthleteConfiguration` インターフェースを利用する。\n\n```ts\n// configuration 用のオブジェクトを作成。\nconst config: AuthleteConfiguration = {\n    baseUrl:               '...',\n    serviceOwnerApiKey:    '...',\n    serviceOwnerApiSecret: '...',\n    serviceApiKey:         '...',\n    serviceApiSecret:      '...',\n    timeout:               ...\n};\n\n// AuthleteApi のインスタンスを作成。\nconst api = await AuthleteApiFactory.create(config);\n```\n\n**方法 2**: `AuthletePropertyConfiguration` クラスを利用する。\n\n外部ファイルを用いて設定を行いたい場合は、`AuthleteConfiguration`\nインターフェースの実装クラスである `AuthletePropertyConfiguration`\nクラスを利用してください。このクラスの `create()` メソッドは、実行ディレクトリ直下にある設定ファイル\n(`authlete.json`) をロードし、その内容に基づいて configuration 用のオブジェクトを作成します。\n以下のその例です。\n\n```ts\n// 'authlete.json' をロードして、configuration 用のオブジェクトを作成。\nconst config = await AuthletePropertyConfiguration.create();\n\n// AuthleteApi のインスタンスを作成。\nconst api = await AuthleteApiFactory.create(config);\n```\n\n設定ファイル (`authlete.json`) 内で有効なプロパティーキーとその意味は次のとおりです。\n\n| プロパティーキー         | 説明                                                                   |\n|:------------------------|:----------------------------------------------------------------------|\n| `baseUrl`               | Authlete サーバーの URL。デフォルト値は `https://api.authlete.com/api`。|\n| `serviceApiKey`         | サービスの API キー。                                                  |\n| `serviceApiSecret`      | サービスの API シークレット。                                           |\n| `serviceOwnerApiKey`    | あなたのアカウントの API キー。                                         |\n| `serviceOwnerApiSecret` | あなたのアカウントの API シークレット。                                  |\n| `timeout`               | API リクエストのタイムアウト値（ミリ秒）。デフォルト値は `5000`。          |\n\n#### AuthleteApi メソッドのカテゴリー\n\n`AuthleteApi` インターフェースのメソッド群は幾つかのカテゴリーに分けることができます。\n\n  1. 認可エンドポイント実装のためのメソッド群\n\n  - `authorization(AuthorizationRequest request)`\n  - `authorizationFail(AuthorizationFailRequest request)`\n  - `authorizationIssue(AuthorizationIssueRequest request)`\n\n  2. トークンエンドポイント実装のためのメソッド群\n\n  - `token(TokenRequest request)`\n  - `tokenFail(TokenFailRequest request)`\n  - `tokenIssue(TokenIssueRequest request)`\n\n  3. サービス管理のためのメソッド群\n\n  - `createService(service: Service)`\n  - `deleteService(serviceApiKey: number)`\n  - `getService(serviceApiKey: number)`\n  - `getServiceList(start?: number, end?: number)`\n  - `updateService(service: Service)`\n\n  4. クライアントアプリケーション管理のためのメソッド群\n\n  - `createClient(client: Client)`\n  - `deleteClient(clientId: number)`\n  - `getClient(clientId: number)`\n  - `getClientList(developer?: string, start?: number, end?: number)`\n  - `updateClient(client: Client)`\n\n  5. アクセストークンの情報取得のためのメソッド群\n\n  - `introspection(request: IntrospectionRequest)`\n  - `standardIntrospection(request: StandardIntrospectionRequest)`\n\n  6. アクセストークン取り消しエンドポイント実装のためのメソッド群\n\n  - `revocation(request: RevocationRequest)`\n\n  7. ユーザー情報エンドポイント実装のためのメソッド群\n\n  - `userInfo(request: UserInfoRequest)`\n  - `userInfoIssue(request: UserInfoIssueRequest)`\n\n  8. JWK セットエンドポイント実装のためのメソッド群\n\n  - `getServiceJwks(pretty: boolean, includePrivateKeys: boolean)`\n\n  9. OpenID Connect Discovery のためのメソッド群\n\n  - `getServiceConfiguration(pretty: boolean)`\n\n  10. CIBA (Client Initiated Backchannel Authentication) のためのメソッド群\n\n  - `backchannelAuthentication(request)`\n  - `backchannelAuthenticationIssue(request)`\n  - `backchannelAuthenticationFail(request)`\n  - `backchannelAuthenticationComplete(request)`\n\n  11. Device Flow のためのメソッド群\n\n  - `deviceAuthorization(request)`\n  - `deviceComplete(request)`\n  - `deviceVerification(request)`\n\n  12. PAR (Pushed Authorization Request) のためのメソッド群\n\n  - `pushAuthorizationRequest(request)`\n\n  13. トークン管理のためのメソッド群\n\n  - `getTokenList(subject, clientIdentifier, start, end)`\n  - `tokenCreate(request)`\n  - `tokenDelete(accessTokenIdentifier)`\n  - `tokenRevoke(request)`\n  - `tokenUpdate(request)`\n\nリリース手順\n--------\n\n#### 1. ドキュメント更新\n\n`README.md` と `README.md.ja`、`CHANGE.md` と `CHANGE.md.ja` を適宜更新します。\n\n#### 2. ライブラリ公開\n\n[Github のリリースページ][GithubReleasePage] 上で新しいバージョンのライブラリを\nリリースします。（Github のリリース機能の詳細については、[こちらのページ][GithubManagingRelease]\nご覧ください。）\n\nGithub 上でリリースを行うことにより webhook がトリガーされ、自動的に新規バージョンのライブラリが\n[deno.land/x][DenoLandX] へと公開されます。\n\nその他の情報\n------------\n\n- [Authlete][Authlete] - Authlete ホームページ\n- [authlete-deno-oak][AuthleteDenoOak] - oak 用 Authlete Deno ライブラリ\n- [deno-oak-oauth-server][DenoOakOauthServer] - 認可サーバー実装\n- [deno-oak-resource-server][DenoOakResourceServer] - リソースサーバー実装\n\nコンタクト\n----------\n\n| 目的 | メールアドレス       |\n|:-----|:---------------------|\n| 一般 | info@authlete.com    |\n| 営業 | sales@authlete.com   |\n| 広報 | pr@authlete.com      |\n| 技術 | support@authlete.com |\n\n[Authlete]:               https://www.authlete.com/\n[AuthleteAPI]:            https://docs.authlete.com/\n[AuthleteDenoOak]:        https://github.com/authlete/authlete-deno-oak\n[AuthleteGettingStarted]: https://www.authlete.com/developers/getting_started/\n[AuthleteOverview]:       https://www.authlete.com/documents/overview\n[DenoLandX]:              https://deno.land/x\n[DenoOakOauthServer]:     https://github.com/authlete/deno-oak-oauth-server\n[DenoOakResourceServer]:  https://github.com/authlete/deno-oak-resource-server\n[GithubManagingRelease]:  https://docs.github.com/en/github/administering-a-repository/managing-releases-in-a-repository\n[GithubReleasePage]:      https://github.com/authlete/authlete-deno/releases\n[Oak]:                    https://github.com/oakserver/oak\n[OIDC]:                   https://openid.net/connect/\n[RFC6749]:                https://tools.ietf.org/html/rfc6749","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauthlete%2Fauthlete-deno","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fauthlete%2Fauthlete-deno","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauthlete%2Fauthlete-deno/lists"}