-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathgenotpurl.1
128 lines (128 loc) · 3.36 KB
/
genotpurl.1
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
.\" -*- nroff -*-
.\"
.\" genotpurl - Generate Google Authenticator URLs
.\"
.\" Copyright 2009 Archie L. Cobbs <[email protected]>
.\"
.\" Licensed under the Apache License, Version 2.0 (the "License");
.\" you may not use this file except in compliance with the License.
.\" You may obtain a copy of the License at
.\"
.\" http://www.apache.org/licenses/LICENSE-2.0
.\"
.\" Unless required by applicable law or agreed to in writing, software
.\" distributed under the License is distributed on an "AS IS" BASIS,
.\" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
.\" See the License for the specific language governing permissions and
.\" limitations under the License.
.\"/
.Dd July 21, 2018
.Dt GENOTPURL 1
.Os
.Sh NAME
.Nm genotpurl
.Nd Generate Google Authenticator URLs
.Sh SYNOPSIS
.Nm genotpurl
.Bk -words
.Fl I Ar issuer
.Fl L Ar label
.Op Fl k Ar key
.Op Fl K Ar keylen
.Op Fl i
.Op Fl c Ar counter
.Op Fl d Ar num-digits
.Op Fl p Ar period
.Ek
.Sh DESCRIPTION
.Nm
is a utility for generating URLs for the Google Authenticator cell phone app, which
generates one-time passwords compatible with the HOTP/OATH algorithm defined by RFC 4226.
When an URL is processed by the Google Authenticator app, the corresponding secure token
is automatically installed into the app.
.Pp
The
.Ar issuer
and
.Ar label
are required; these strings are displayed in the app along with the current token value.
.Pp
The
.Ar key
is the token's binary secret key and is specified as a hexadecimal string.
If no
.Ar key
is given,
.Nm
generates a random key and prints it to standard error;
this key must then be installed into the server application that verifies the one-time passwords
and associated with the user who will be using the secure token.
.Pp
The
.Fl i ,
.Fl c ,
.Fl d ,
and
.Fl p
flags allow creation of non-standard tokens, but these may not be supported by Google Authenticator.
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl c
Specify the starting target counter value for the one-time password generation.
This flag is incompatible with the
.Fl t
flag.
.It Fl d
Specify the number of digits in the one-time password.
The default value is six.
.It Fl h
Print the usage message and exit successfully.
.It Fl I
Specify token issuer (e.g., "Example Industries, Inc.")
.It Fl i
Create an interval-based token instead of a time-based token.
.It Fl k
Specify the token binary secret key as a hexadecimal string.
.Pp
If no
.Ar key
is given,
.Nm
generates a random key and prints it to standard output.
.It Fl K
Specify generated key length.
Ignored if
.Fl k
is also specified.
.It Fl L
Specify token label (e.g., "[email protected]")
.It Fl p
Specify the length of a single time interval in seconds.
The default value is 30 seconds.
Ignored if
.Fl i
is given.
.El
.Sh EXAMPLES
.Bk -words
To generate a new secure token and generate the corresponding QR code:
.Pp
genotpurl -I "Acme, Inc" -L [email protected] | qrencode -s 6 -o qrcode.png
.Ek
.Sh SEE ALSO
.Xr qrencode 1
.Pp
.Rs
.%T "mod_authn_otp: Apache module for one-time password authentication"
.%O "https://github.com/archiecobbs/mod-authn-otp"
.Re
.Rs
.%T "Google Authenticator (iOS)"
.%O "https://itunes.apple.com/us/app/google-authenticator/id388497605?mt=8"
.Re
.Rs
.%T "Google Authenticator (Android)"
.%O "https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en_US"
.Re
.Sh AUTHOR
.An Archie L. Cobbs Aq [email protected]