Skip to main content Help Control Panel

Login   A+   A-

Development «   Development blog «  

Authenticator for REST (POST only) - 8.6

Attached, an authenticator which checks login/password by sumbitting a POST form

The following authenticator allows Yacs to remotely check password by POSTing a form to a remote page.

To use it :

  • copy the attached file to the "users/authenticators/" directory
  • in the YACS control panel, setup the following line as remote authenticator : restpost http:www.mydomain.com/authenticate.do username password

The second paramater is the target URL where your login/password can be checked. The last 2 parameters are the field names where username & password are filled in.

The server is expected to return 200 HTTP status code on success. Any other code is a failure.

Comment for developers: to send the POST over a socket, it could have been better to have a new variant 'restpost' managed by the script "services/call.php" (instead of doing its own function to call the server). If this authenticator becomes popular, we could maybe think about adapting this file ?

Files

restpost.zip v1 2,104 bytes, 68 downloads
Edited by Alf83 on May 9
Zoom

Comments

1- Bernard on May 30Reply · Quote

Ok, à intégrer dans le code coeur de yacs, après quelques retouches mineures. Merci de cet envoi.

2- Bernard on Jul. 6Reply · Quote

Fully integrated into yacs 8.6 core set of scripts. Thanks.

Tags: Authenticator post

Rate this page
Posted by Alf83 on May 9, page edited by Bernard on Jul. 6, (popular)