#!/usr/bin/env python3
import argparse
import base64
import json


parser = argparse.ArgumentParser()
parser.add_argument('token')

if __name__ == '__main__':
    args = parser.parse_args()
    token = args.token.encode()
    b64_claims = base64.decodebytes(token.split(b'.')[1] + b'=' * 3)
    print(json.dumps(json.loads(b64_claims), indent=2))
