Download the PHP package studio-design/auth-sdk-php without Composer

On this page you can find all versions of the php package studio-design/auth-sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package auth-sdk-php

studio-design/studio-auth-php

Auth Service の PHP SDK です。OpenAPI 仕様から自動生成されています。

ドキュメント

全エンドポイント・スキーマ・エラーレスポンスを網羅した API リファレンスは、社内開発者ポータル(Google IAP 保護・社内メンバー限定)で公開されています。ポータルのトップページから「Auth Service API」を開いてください。

要件

インストール

安定版

Snapshot 版(リリース前検証用)

main にマージされた未リリースの SDK 変更を staging で検証する用途で、Composer の prerelease 制約で snapshot タグを取得できます。

X.Y.Z は次回リリース予定のバージョン(直近 stable パッチ + 1)です。最新の snapshot タグは studio-auth-php の Tags を参照してください。

⚠️ snapshot 版は staging / CI 検証用です。本番デプロイには安定版(composer require studio-design/studio-auth-php または :^X.Y.Z)を使用してください。

使い方

ホスト設定(必須)

SDK にはデフォルトのホスト URL が設定されていません。利用前に必ず setHost() で接続先を指定してください。

AdminApi(BearerAuth)— 組織一覧取得

Admin 系のエンドポイントは Bearer トークン(JWT)で認証します。

AuthApi(ClientBasicAuth)— トークンイントロスペクション

OAuth 2.0 のトークンエンドポイントやイントロスペクションは HTTP Basic 認証(client_id / client_secret)で認証します。

アクセストークンの取得

Bearer 認証で使うアクセストークンは、Authorization Code + PKCE フロー(/oauth/authorize/oauth/token)で発行されます。有効期限切れ時は refresh_token グラントで再発行します。フローの詳細は社内ポータルの API リファレンスを参照してください。client_id / client_secret は Auth Service 管理者がアプリケーションごとに発行します。

エラーハンドリング

API エラーは HTTP ステータスに応じた Studio\Auth\ApiException のサブクラスとして送出されます(同期・非同期メソッドで共通。未マップのステータスや接続エラーは基底の ApiException のまま)。非同期メソッドの場合は、返り値の promise がこれらの例外で reject されます:

HTTP ステータス 例外クラス
400 Studio\Auth\Exception\BadRequestException
401 Studio\Auth\Exception\UnauthorizedException
403 Studio\Auth\Exception\ForbiddenException
404 Studio\Auth\Exception\NotFoundException
409 Studio\Auth\Exception\ConflictException
422 Studio\Auth\Exception\UnprocessableEntityException
429 Studio\Auth\Exception\RateLimitException
5xx Studio\Auth\Exception\ServerException

ApiException::getProblem() は、Content-Type: application/problem+json のエラーボディが正しくデシリアライズできたときだけ RFC 9457 Problem Details(getType() / getTitle() / getStatus() / getDetail())を返します。ボディが空のとき、application/problem+json でないとき(OAuth の {"error": ...} 形式や userinfo の RFC 6750 エラーを含む)、またはデシリアライズに失敗したときは null を返します。エラー種別の判定には、従来どおり例外のサブクラス(NotFoundException 等)または getCode()(HTTP ステータスコード)を使ってください

API エンドポイント一覧

Class Method HTTP request Description
APIApi checkSsoEnforcement GET /api/sso-enforcement/check SSO 強制判定エンドポイント
AdminApi createAdminPortalSession POST /admin/organizations/{organization_id}/admin-portal-sessions Admin Portal セッション生成
AdminApi createClient POST /admin/clients クライアント登録
AdminApi createOrganization POST /admin/organizations 組織登録
AdminApi createOrganizationInvitation POST /admin/organizations/{organization_id}/invitations メンバー招待
AdminApi deleteClient DELETE /admin/clients/{client_id} クライアント削除
AdminApi getClient GET /admin/clients/{client_id} クライアント詳細取得
AdminApi getOrganization GET /admin/organizations/{organization_id} 組織詳細取得
AdminApi listClients GET /admin/clients クライアント一覧取得
AdminApi listOrganizationInvitations GET /admin/organizations/{organization_id}/invitations 招待一覧取得
AdminApi listOrganizationMembers GET /admin/organizations/{organization_id}/members 組織メンバー一覧取得
AdminApi listOrganizations GET /admin/organizations 組織一覧取得
AdminApi removeOrganizationMember DELETE /admin/organizations/{organization_id}/members/{member_id} メンバー削除
AdminApi revokeOrganizationInvitation DELETE /admin/organizations/{organization_id}/invitations/{invitation_id} 招待取消
AdminApi updateClient PATCH /admin/clients/{client_id} クライアント更新
AdminApi updateOrganization PATCH /admin/organizations/{organization_id} 組織更新
AdminApi updateOrganizationMemberRole PATCH /admin/organizations/{organization_id}/members/{member_id} メンバーロール変更
AuthApi endSession GET /oauth/logout ログアウトエンドポイント
AuthApi endSessionPost POST /oauth/logout ログアウトエンドポイント (POST)
AuthApi getUserinfo GET /oauth/userinfo ユーザー情報の取得
AuthApi handleIdpCallback GET /oauth/callback IdP コールバック処理
AuthApi initiateAuthorization GET /oauth/authorize 認可フローの開始
AuthApi introspectToken POST /oauth/introspect トークンイントロスペクションエンドポイント
AuthApi issueTokens POST /oauth/token トークンエンドポイント
AuthApi postUserinfo POST /oauth/userinfo ユーザー情報の取得 (POST)
AuthApi revokeToken POST /oauth/revoke トークン無効化エンドポイント
OrganizationApi createMyAdminPortalSession POST /organizations/{organization_id}/admin-portal-sessions 自組織のAdmin Portal セッション生成(組織メンバー向け)
OrganizationApi getMemberMe GET /organizations/{organization_id}/members/me 自分自身の組織メンバー情報取得(組織メンバー向け)
OrganizationApi getMyOrganization GET /organizations/{organization_id} 自分が所属する組織情報取得(組織メンバー向け)
OrganizationApi listMembers GET /organizations/{organization_id}/members 組織メンバー一覧取得(組織メンバー向け)
OrganizationApi removeMember DELETE /organizations/{organization_id}/members/{member_id} メンバー削除(組織メンバー向け)
OrganizationApi sendInvitation POST /organizations/{organization_id}/invitations 組織Adminによるメンバー招待
OrganizationApi updateMemberRole PATCH /organizations/{organization_id}/members/{member_id} メンバーロール変更(組織メンバー向け)
OrganizationApi updateMyOrganization PATCH /organizations/{organization_id} 自分が所属する組織情報更新(組織メンバー向け)
SystemApi getHealthStatus GET /health ヘルスチェック
SystemApi getJwks GET /jwks JSON Web Key Set の取得
SystemApi getOpenIDConfiguration GET /.well-known/openid-configuration OpenID Connect Discovery
SystemApi getServiceInfo GET / サービス情報

モデル一覧

認証方式

BearerAuth

ClientBasicAuth

コントリビュート

このリポジトリは OpenAPI 仕様から自動生成される読み取り専用のリリースミラーです。ファイルはリリースごとに上書きされるため、Pull Request は受け付けられません。バグ報告・機能要望は GitHub Issues へお願いします。

ライセンス

MIT License - LICENSE を参照してください。


このパッケージは Studio Auth Service の OpenAPI 仕様 から自動生成されています(SDK バージョン: 0.5.0)。


All versions of auth-sdk-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-curl Version *
ext-json Version *
ext-mbstring Version *
guzzlehttp/guzzle Version ^7.4.5
guzzlehttp/psr7 Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package studio-design/auth-sdk-php contains the following files

Loading the files please wait ...