Enable Grizzly to Run a Simple JaaS HTTP Request

How can I get the Grizzly HTTP server to allow JaaS for simple HTTP AUTH? I do not see any code / sample. There is another post in StackOverflow that explicitly assumes jaaS is available in Grizzly but does not explain how to add it.

+3
source share
1 answer

I don't think the Grizzly HTTP server provides basic auth out of the box. If you do not want to use a full-scale implementation, such as Glassfish, you can implement your own filter and add it to the list of grizzly filters. The following is an example of how to retrieve login information through HTTP basic auth and how to integrate it into JAAS objects in a grizzly context. But this requires a significant amount of coding.

http://java.net/projects/jersey/sources/svn/content/trunk/jersey/samples/https-clientserver-grizzly/src/main/java/com/sun/jersey/samples/https_grizzly/auth/SecurityFilter. java? rev = 5160

Hope this helps.

+3
source

Source: https://habr.com/ru/post/1748000/


All Articles