Endpoints
const rp = await OidcClient.factory({ ... });const endpoints = rp.endpoints;authHookの外側に配置する必要がある- パスが
nullに設定されたエンドポイントは無効化される - 参照: openid-client API Documentation - Client
- ElysiaJSプラグインとしてのメタデータ
- 名称:
elysia-openid-client-endpoints - シード:
settings.pluginSeed、未指定ならissuerUrl
- 名称:
Login
- 既定のパス:
/auth/login - メソッド:
GET openid-clientのclient.authorizationUrlを呼び出す- OPの認証エンドポイントにリダイレクトする
Callback
- 既定のパス:
/auth/callback - メソッド:
GET openid-clientのclient.callbackParamsとclient.callbackを呼び出す- OPからリダイレクトされた後、ログイン完了ページにリダイレクトする
Logout
- 既定のパス:
/auth/logout - メソッド:
GET openid-clientのclient.endSessionUrlを呼び出す- OPのログアウトエンドポイントにリダイレクトする
UserInfo
- 既定のパス:
/auth/userinfo - メソッド:
ALL openid-clientのclient.userinfoを呼び出す- レスポンス(ユーザー情報)をそのまま返す
Introspect
- 既定のパス:
/auth/introspect - メソッド:
ALL openid-clientのclient.introspectを呼び出す- レスポンスをそのまま返す
Refresh
- 既定のパス:
/auth/refresh - メソッド:
ALL openid-clientのclient.refreshを呼び出す- ID Tokenに含まれるクレームを返す
Resource
- 既定のパス:
/auth/resource?url=<resource-url> - メソッド:
GET openid-clientのclient.requestResourceを呼び出す- リソースプロバイダーからのレスポンスを返す
Revoke
- 既定のパス:
/auth/revoke - メソッド:
ALL openid-clientのclient.revokeを呼び出す204を返す
Status
- 既定のパス:
/auth/status - メソッド:
ALL - 内部データベースからセッションステータスを取得する
- OPにはアクセスしない
Claims
- 既定のパス:
/auth/claims - メソッド:
ALL - ID Tokenに含まれるクレームを取得する
- OPにはアクセスしない