Search code examples
c#phpauthenticationsmf

C# SMF Authentication (Licensing)


I'd like to use C# to authenticate a username and password through SMF (Simple Machines Forum). I was wondering if there is a secure way to send a username and password string through HTTPWebRequest that can be easily combined with SMF's authentication system, unless there is a better way (I do not want to use direct mySQL access).

What I am thinking of is something like, on the server side, check if the login is successful. If so, it will echo a certain string "true" and "false".

I've taken a look at the "verification hooks", but I'm not sure how to use them. I also took a look at the login scripts and saw that there's quite a bit of security behind it. Does SMF have any sort of API that can isolate just the login authentication and return a true/false?

Thanks.


Solution

  • There's a quasi RESTful API for SMF 2.x here: http://www.simplemachines.org/community/index.php?topic=458832.0 One of the functions will validate your login for you. If you need to expand it to do other things it can easily be done.