moving to an overload function
[ga4php.git] / doco / readme.txt
1 The GA4PHP Project
2 ==================
3
4 GA4PHP means Google Authenticator for PHP.
5
6 The purpose of this "library" is to provde a convienient and
7 hopefully simple way of provisioning and authenticating users
8 using the Google Authenticator mechanism. For now this lib
9 will only support GA's hotp methods.
10
11
12 Why?
13 ====
14
15 Mostly cause I can. Recently i've been heavily interesting in
16 what is "out there" for FOSS based authentication projects and
17 the Google Authenticator is based on OATH - HOTP/TOTP. It also
18 has a few kewl features, like providing its secret key via QR
19 codes. But looking at the App's available for smartphones
20 (android, iphone, etc), the google auth app was the only one
21 that fullfilled some realistic criteria - easy to use, easy to
22 provision.
23
24
25 READ THIS BIT
26 =============
27
28 in the example page, i send a url off to google charts to create
29 the QRCode. NEVER EVER EVER EVER EVER do this. I do it cause for
30 the example it doesnt matter, and if i find a better way of doing
31 it i'll do it. BUT creating a qrcode on a page aint terribly easy.
32 The point is, that QR code is a URL containing the tokens SECRET
33 KEY and should remain secret. You can generate qrcodes anyway you
34 like, BUT MAKE SURE ITS SECURE (i.e. never save them on the FS,
35 and send them all over ssl).
36
37 If your running on linux, most distro's have a program called
38 qrencode that you can use.
39
40
41 How?
42 ====
43
44 Ultimately, this is just a library with a web based example,
45 the purpose of which is to integrate into your exisint applications,
46 those that are PHP.
47
48
49 Usage
50 =====
51 ... TODO ...
52
53
54 Complications
55 =============
56
57 The only real complication i've had so far is that alot of the
58 HOTP based keys out there provide the secret key as HEX where
59 google choose to use base32, of which there exist no single
60 or simple implementation. So I wrote my (rather terrible so far)
61 own as all i really want to do is convert from base32 back to
62 hex, this I do by converting to binary first... Lets how thats
63 going to work in the long run. The sad thing is is that if I
64 were writing it in C/C++/etc, bit math is easy and while im sure
65 its not too different in PHP, I've never done it, so this seeemed
66 easier.   
67
68
69 Acknowledgements
70 ================
71
72 Google, for producing google authenticator
73 The guys at mOTP who got me all excited about token authenticators
74 The guys on this page who spell out how to do hotp
75         http://php.net/manual/en/function.hash-hmac.php