Quantcast
Channel: Bashタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 2912

Bash: JWT のペイロード部をデコード

$
0
0
decode_jwt.sh
awk-F.'{print $2}' | base64-d | jq .

使い方

./decode_jwt.sh < token01.txt

実行結果

$ ./decode_jwt.sh < token01.txt
{
  "name": "Scott",
  "iss": "https://securetoken.google.com/example",
  "aud": "example",
  "auth_time": 1612656837,
  "user_id": "abcdhsI5umMnbk8bQ5ULPd6Gbd19",
  "sub": "abcdhsI5umMnbk6bQ5ULPd6Gbd19",
  "iat": 1612656839,
  "exp": 1612660439,
  "email": "aaa@example.com",
  "email_verified": false,
  "firebase": {
    "identities": {
      "email": [
        "aaa@example.com"
      ]
    },
    "sign_in_provider": "password"
  }
}

関連情報
Node.js: JWT のペイロード部をデコード
Python3: JWT のペイロード部をデコード
Go: JWT のペイロード部をデコード


Viewing all articles
Browse latest Browse all 2912

Trending Articles