[Mailman-Developers] Anyone with JavaScript skills up for a challenge....
Andrew Stuart
andrew.stuart at supercoders.com.au
Fri Jul 17 04:52:46 CEST 2015
It would be good also if any daring developers with JavaScript skills were willing to have a go at getting something from the authenticating proxy server to display in a browser.
If you decide have a go at it, let me know and we can start by doing a short Google Hangouts session in which I can talk you through the process and concepts.
Step one would be to get the authenticating proxy server running on your Mailman server
There’s almost no documentation I am sorry to say, but there are installation instructions in the readme, and all of the Mailman REST API documentation remains accurate.
https://gitlab.com/astuart/mailmania
There is a handy list of API operations available here:
http://supercoders.com.au/swagger-ui/dist/index.html
Note that the routes are entirely accurate but none of the parameters are.
At its simplest, your JavaScript code would need to:
1: send a request to the login route (you will need to have a user configured in Mailman)
POST /users/{id}/login
2: the login route will send back a JSON web token.
3: you can then send any API request you like to the server but you must provide the JSON web token in the X-Auth-Token: header
It will look something like this:
X-Auth-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkZW50aWZpZXIiOiJ0ZXN0c2VydmVyb3duZXJAbWFpbC5leGFtcGxlLm9yZyIsImV4cCI6MTQzNzE2MTIzOH0.UNo72oWoU4B35Bmmco7PeK7K8eyZcu3OHHBsyhwjhrQ.
4: thats it!
as
More information about the Mailman-Developers
mailing list