www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - [vibe.d] How to create authentication system via REST interface?

reply NX <nightmarex1337 hotmail.com> writes:
I'm trying to understand how to create some json-rest api that 
would return data (in json format) related to that specific 
logged in user. I see the documentation covers these but I'm 
totally new to vibe.d so can't quite figure out putting these two 
things together and make them work. Some easy to follow sample 
would be incredibly helpful, though any help is appreciated.
Mar 15 2017
next sibling parent reply Suliman <evermind live.ru> writes:
On Wednesday, 15 March 2017 at 13:24:07 UTC, NX wrote:
 I'm trying to understand how to create some json-rest api that 
 would return data (in json format) related to that specific 
 logged in user. I see the documentation covers these but I'm 
 totally new to vibe.d so can't quite figure out putting these 
 two things together and make them work. Some easy to follow 
 sample would be incredibly helpful, though any help is 
 appreciated.
You need to look at JWT. There is few good video on youtube about it and packed on code.dlang.org I did not seen ready to use examples :( If will need implement client side look at Vue.js it is very best of existen JS frameworks.
Mar 15 2017
parent =?UTF-8?Q?Ali_=c3=87ehreli?= <acehreli yahoo.com> writes:
On 03/15/2017 07:06 AM, Suliman wrote:

 You need to look at JWT.
WekaIO uses jwtd, with minor improvements on it (improved error handling and code coverage): https://github.com/weka-io/jwtd Ali
Mar 15 2017
prev sibling parent aberba <karabutaworld gmail.com> writes:
On Wednesday, 15 March 2017 at 13:24:07 UTC, NX wrote:
 I'm trying to understand how to create some json-rest api that 
 would return data (in json format) related to that specific 
 logged in user. I see the documentation covers these but I'm 
 totally new to vibe.d so can't quite figure out putting these 
 two things together and make them work. Some easy to follow 
 sample would be incredibly helpful, though any help is 
 appreciated.
The "examples" folder in the github repo has demo on rest api. Along with the vibe.d api reference, you should get a badic service working. Authentication can be tricky but you can append a query with some api key for each request to authenticate.
Mar 15 2017