Re: Auth feature
| From: | Michael Bretterklieber | Date: | Sat, 05 Apr 2003 18:58:24 +0000 |
| Subject: | Re: Auth feature | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-14927@lists.php.net to get a copy of this message | ||
Hi,
Yavor Shahpasov wrote:
http://www.sanisoft.com/phplib/manual/auth_Response.php What do you think, I could probably start working on this, will it be accepted martin? I had the same idea (wich is a very good idea), started up with the implementation, but never finished it, due to time constraints.The problem is that, in order to get this to work you must pass the challenge or better a reference to the auth object to the fetchData() Method of each Auth-Container for accessing the challenge. The next thing is that it should be RFC conform, md5(chapid + pass + challenge). My intention was not only to support CHAP-MD5 but also MS-CHAPv1 and MS-CHAPv2. The disadvantage of CHAP-MD5 is that you must have the plaintext pass stored on the server, MS-CHAP solves this by using the nthash(), this means you must have the password as nthash() wich is md4(str2unicode(plaintext)). The advantage of this is obvious, you can authenticate without sending or storing any plaintext password. I also wrote a File_SMBPasswd package - wich will be hopefuly soon reviewed (Mika!) - and an auth container, so its possible to authenticate against SAMBA smbpasswd-files, where nt-hashes are stored. You can also Authenticate against RADIUS servers by using one of the CHAP methods. I also have a Crypt_CHAP package written wich is able to generate all pakets for challenge-response-authentication for all types (CHAP-MD5, MS-CHAPv1, MS-CHAPv2), so I recommend to use this package instead of writing code twice. I had a complete class-hierarchie in mind: Auth_CHAP extends Auth Auth_MSCHAPv1 extends Auth_CHAP Auth_MSCHAPv2 extends Auth_MSCHAPv1 I also wrote some JavaScript stuff for generating challenges and the right pakets. If you wan't you can have my code and continue based on this code, because I have no time in the next weeks to continue with them. bye, -- ------------------------------- ------------------------------------- Michael Bretterklieber - Michael.Bretterklieber@jawa.at JAWA Management Software GmbH - http://www.jawa.at Liebenauer Hauptstr. 200 -------------- privat --------------- A-8041 GRAZ GSM: ++43-(0)676-93 96 698 Tel: ++43-(0)316-403274-12 E-mail: michael@bretterklieber.com Fax: ++43-(0)316-403274-10 http://www.bretterklieber.com ------------------------------- ------------------------------------- "...the number of UNIX installations has grown to 10, with more expected..." - Dennis Ritchie and Ken Thompson, June 1972