Best Method/Library For Remote Authentication
        Posted  
        
            by 
                Mike
            
        on Programmers
        
        See other posts from Programmers
        
            or by Mike
        
        
        
        Published on 2012-06-08T15:58:04Z
        Indexed on 
            2012/06/08
            16:48 UTC
        
        
        Read the original article
        Hit count: 313
        
I have a web app that has a REST API interface: http://api.example.com/core that uses API Keys and domain specific keys (key has to be used on the specified domain).
I then will have several client sites with ajax forms where we will require users to sign in before being able to submit the form. This form will add data to a table, and submit an email to several recipients along with checking credentials.
This form will use an ajax submit to our REST API.
All Communication to/from the API is over SSL
Ideal Flow: Visitor Fills Form Out -> Enters User/pass -> Submits Form -> ajax request to REST API -> API Verifies credentials -> does CRUD -> sends emails -> returns 200/403 -> perform DOM manipulation based on return code in ajax call
Are there any libraries in PHP that currently do something to this similarly? Would OAuth be a good use for this scenario?
Languages used are: js/html/css/php/MySQL
© Programmers or respective owner