a stupid implementaiton of function passing into an object... rediculouse thing to do
[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 Complications
54 =============
55
56 The only real complication i've had so far is that alot of the
57 HOTP based keys out there provide the secret key as HEX where
58 google choose to use base32, of which there exist no single
59 or simple implementation. So I wrote my (rather terrible so far)
60 own as all i really want to do is convert from base32 back to
61 hex, this I do by converting to binary first... Lets how thats
62 going to work in the long run. The sad thing is is that if I
63 were writing it in C/C++/etc, bit math is easy and while im sure
64 its not too different in PHP, I've never done it, so this seeemed
65 easier.   
66
67
68 Acknowledgements
69 ================
70
71 Google, for producing google authenticator
72 The guys at mOTP who got me all excited about token authenticators
73 The guys on this page who spell out how to do hotp
74         http://php.net/manual/en/function.hash-hmac.php