auth
認証の管理を行います。
auth login
認証を設定します。
bash
lm auth login [--type longterm|stateless|v2] [--profile <name>]| フラグ | デフォルト | 説明 |
|---|---|---|
--type, -t | longterm | トークン種別: longterm, stateless, v2 |
--profile | default | プロファイル名 |
longterm
bash
lm auth login
# Channel ID と Long-term Channel Access Token を入力stateless
bash
lm auth login --type stateless
# Channel ID と Channel Secret を入力
# → 即座にトークンを発行して検証v2 (JWT assertion)
bash
lm auth login --type v2
# Channel ID と Private Key ファイルパスを入力
# → JWT assertion でトークンを発行auth logout
アクティブプロファイルのトークンと認証情報を削除します。
bash
lm auth logout [--profile <name>]auth status
現在の認証状態を表示します。
bash
lm auth status [--profile <name>]auth list
設定済みのプロファイル一覧を表示します。* はアクティブプロファイルを示します。
bash
lm auth list* default 1234567890 longterm authenticated
staging 9876543210 stateless expiredauth switch
アクティブプロファイルを切り替えます。
bash
lm auth switch <profile>auth token
現在のトークンを stdout に出力します(スクリプト用)。
bash
lm auth token [--check] [--profile <name>]| フラグ | 説明 |
|---|---|
--check | トークンの有効性を exit code で返す(0: 有効、2: 無効)。stdout 出力なし |
auth remove
プロファイルを完全に削除します(設定・認証情報・トークンすべて)。
bash
lm auth remove <profile>