twitchdev / twitch-cli

The official Twitch CLI to make developing on Twitch easier.
Apache License 2.0
604 stars 71 forks source link

Added --validate flag to twitch token #277

Closed Xemdo closed 1 year ago

Xemdo commented 1 year ago

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Problem/Feature

Solved #271 by adding --validate to twitch token

Description of Changes:

Added --validate flag to twitch token:

$ ./twitch-cli token --validate <user token>
Client ID: 718ozxefxg7qak0jsvmrahw9pq3qch
Token Type: User Access Token
User ID: 57047445
User Login: xemdo
Expires In: 15145 (Sat, 23 Sep 2023 06:15:33 UTC)
Scopes:
- channel:read:polls
- channel:read:vips
- user:read:follows
- user:read:subscriptions

$ ./twitch-cli token --validate <app token>
Client ID: dy5l2nnrf1fybxoupqb73kw5ksqhw6
Token Type: App Access Token
Expires In: 5053085 (Mon, 20 Nov 2023 13:41:43 UTC)
Scopes: None

Checklist