This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

linux passwd or htpasswd from XSLT?


Hi,

I have an application that lets users create content during development 
time based off of the approot, e.g.
http://mysite.com

then the users can generate the site for QA to:

http://clientsite.mysite.com

During development the admin can add users.  In the app I use java to 
authenticate. i don't want to create an instance of the virtual machine 
for each clientsite so i thought I would try to use a simple .htaccess 
file. No problem creating that :)

The problem:
I want to use the htpasswd linux library to generate the user to the 
passwords.file

- I was hoping there is an existing extension?? (can't find one...)
- is there anyway to do this in pure XSLT (I think I know the answer to 
this... :(
- If I created an extension I assume I have to use JNI - is there 
anybody out there who could help me out with i?  can I just do something 
like:

<value-of select="linux_lib:htpasswd($user_name, $passwd)"/>

and then the java is something as simple as:

public static native boolean htpasswd( String strUser, String strPass );  
....

try {                                                                 
   System.loadLibrary( "htpasswd" );      
   htpasswd(user, passwd);                          
} catch( UnsatisfiedLinkError e ) {                                     
   System.out.println(                                                
          "Could not load native code for user authentication." );
   System.exit(1);                                                    
}     

[I am in over my head...]

Any ideas or advice?

Thanks,
-Rob         


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]