You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/token.go
+38Lines changed: 38 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,9 @@ package cmd
5
5
import (
6
6
"fmt"
7
7
"strconv"
8
+
"time"
8
9
10
+
"github.com/fatih/color"
9
11
"github.com/twitchdev/twitch-cli/internal/login"
10
12
11
13
"github.com/spf13/cobra"
@@ -15,6 +17,7 @@ import (
15
17
varisUserTokenbool
16
18
varuserScopesstring
17
19
varrevokeTokenstring
20
+
varvalidateTokenstring
18
21
varoverrideClientIdstring
19
22
vartokenServerPortint
20
23
vartokenServerIPstring
@@ -32,6 +35,7 @@ func init() {
32
35
loginCmd.Flags().BoolVarP(&isUserToken, "user-token", "u", false, "Whether to login as a user or getting an app access token.")
33
36
loginCmd.Flags().StringVarP(&userScopes, "scopes", "s", "", "Space separated list of scopes to request with your user token.")
34
37
loginCmd.Flags().StringVarP(&revokeToken, "revoke", "r", "", "Instead of generating a new token, revoke the one passed to this parameter.")
38
+
loginCmd.Flags().StringVarP(&validateToken, "validate", "v", "", "Instead of generating a new token, validate the one passed to this parameter.")
35
39
loginCmd.Flags().StringVar(&overrideClientId, "client-id", "", "Override/manually set client ID for token actions. By default client ID from CLI config will be used.")
36
40
loginCmd.Flags().StringVar(&tokenServerIP, "ip", "localhost", "Manually set the IP address to be binded to for the User Token web server.")
37
41
loginCmd.Flags().IntVarP(&tokenServerPort, "port", "p", 3000, "Manually set the port to be used for the User Token web server.")
0 commit comments