forked from project-fifo/erlang-yubico
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
29 lines (18 loc) · 870 Bytes
/
README
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
Erlang-Yubico
Client implementing the Yubico Validation Protocol Version 2.0.
Quick example :
1) get an API key and ID from
https://upgrade.yubico.com/getapikey/
say you got id "87" and secret "tXCs0HUt4IyRhQB8pn7oeO3o6RQ=".
2) run 'erlc *.erl; erl' to compile the client source and start
an Erlang shell.
3) Try to validate an OTP from your Yubikey :
Eshell V5.7.4 (abort with ^G)
1> yubico:simple_verify("vvvvvvcucrlcietctckflvnncdgckubflugerlnr", "87", "tXCs0HUt4IyRhQB8pn7oeO3o6RQ=", []).
{auth,ok}
2>
Try to validate the SAME OTP again (supposed to fail, obviously)
2> yubico:simple_verify("vvvvvvcucrlcietctckflvnncdgckubflugerlnr", "87", "tXCs0HUt4IyRhQB8pn7oeO3o6RQ=", []).
{bad_auth,replayed_otp}
3>
See the documentation at the top of yubico.erl for more information.