[foaf-protocols] FOAF+SSL: Code Fragments in PHP Used for Simple Authentication
melvincarvalho at gmail.com
Tue Dec 16 14:13:36 CET 2008
The following are some documented code fragments in PHP, that are used to
create a simple authentication system, using FOAF + SSL
1. Code fragments for SSL related functions:
- Displaying the output of the $_SERVER global variable
- Displaying the details in the supplied Client Certificate
- Displaying the Client Public Key info
- Function returning the Client Public Key info in HEX
- Function returning the subjectAltName in the Client Certificate
Note: Since we were unable to find an ASN.1 parser in PHP, an attempt was
made to do this via the shell using openssl, as a stop gap.
2. Code fragments for FOAF related functions:
- Converting a FOAF file into an array of triples
- Finding the RSA Key of the declared subject ("owner") within a FOAF file
- Getting the list of friends in a FOAF file
Note: ARC2  was used to obtain triples from the remote file, which were
iterated through. Though, it would be possible to run more complex SPARQL
queries, as desired.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the foaf-protocols