How to secure Spring MVC REST service json response

2.8k views Asked by At

I am using Spring MVC and REST web services. When I make a REST service call my Spring MVC controller will return me a JSON response. Everything is fine till now. I have a requirement where I need to encrypt the spring controller response which is a plain text.

For Ex : I will do a REST call like

http://www.AAAAA.com/app/getNameDetails

and my response is

{"name": "Naveen", "email": "[email protected]", "desg" : "SE"}

My problem is when I call that URL on the browser then it will simply display the above response in the plain text format. I want to secure this plain json response which is coming from the spring controller.

Is there any way we can do this or else am I on the wrong path..!!??

1

There are 1 answers

0
user1214083 On

The most useful way authorize your url pattern

see this

Security for Spring Restful Web Services