Securing the custom module

I was able to create a sample module which returns a json {ok:true}. But I am able to access this without login to the system. (http://localhost:8080/example) How do you make configurations to secure this api pls?


Hi sedil,
I could not get your point, could you explain more about your question ?

I created a new module and I was able to get a JSON output when I hit this URL : http://localhost:8080/example. But this api end point should be only accessible once the user is logged into openpaas. Otherwise anyone can access this url and get the data by hitting that end point. Is it handled in openpaas to add some attributes etc.

Dear sedil,
Here you could find how the open-paas verify end point by using this function
Everywhere in the implement you could find relative to this function is verify the authorization