[ejabberd] parallelized external authentication

Andy Skelton skeltoac at gmail.com
Sat Jul 31 17:02:32 MSD 2010


> It looks like all you're doing is defining the command to run, so why
> wouldn't it work with perl (or anything else) the way it is?  Perhaps all
> you would need to do is remove references to php and wordpress.
>
> I haven't looked at your code in depth (I'm still not very well versed in
> erlang,) but I'm assuming that you are saying that your module is calling
> the external script differently than extauth does.

php_app uses open_port({spawn, Command}, PortOpts) similar to extauth,
it uses ! to send PHP code for eval (or [Function, Args]) and it uses
receive to get the return value and any output. Nothing original
there.

I mentioned it because it provides a managed pool of external
resources. I use it for more than authentication, so what may seem
like overkill is for me a handy reusable resource. If any part of the
code is useful, have at it.

Andy


More information about the ejabberd mailing list