-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathhtdecodetoken.1
More file actions
53 lines (46 loc) · 1.35 KB
/
htdecodetoken.1
File metadata and controls
53 lines (46 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
.TH htdecodetoken 1
.SH NAME
htdecodetoken \- decode JSON Web Token
.SH SYNOPSIS
.B htdecodetoken
[-a] [-H] [file]
.PP
.B httokendecode
[-a] [-H] [file]
.SH DESCRIPTION
.B htdecodetoken
(also known as
.BR httokendecode )
decodes a JSON Web Token (JWT) and prints the JSON output to standard
output.
If a file name provided is "-" it reads the JWT from standard input.
If no file name is given, it follows the WLCG Bearer Token Discovery
protocol, which is to first try reading the token from $BEARER_TOKEN,
next reading the token from the file defined in $BEARER_TOKEN_FILE,
and finally reading from a file called "bt_u`id -u`" either in
$XDG_RUNTIME_DIR if it is defined or else in /tmp.
If the
.B scitokens-verify
command is found in $PATH, then after decode that command is also run
and will print an error if the JWT is not found to be currently valid.
.SH OPTIONS
The following options are recognized:
.PP
.TP
.B \-a
Additionally shows the algorithm portion of the JWT in a separate JSON
structure printed first to standard output.
.TP
.B \-H
Prints scopes (specifically "nbf", "iat", and "exp")
that are normally shown in Epoch time
(seconds since the beginning of 1970)
instead in the human-readable form used by default by the
.B date
command.
.SH AUTHOR
Dave Dykstra
.SH COPYRIGHT
Copyright \(co 2023 Fermi National Accelerator Laboratory
.SH "SEE ALSO"
htgettoken(1)