I'm not clear about all your questions, but we use Angular2 with dropwizard 
and that's how we do it:
 - we bundle the frontend (the angular dist files with the index.html file) 
in the classpath of the dropwizard aplication. See 
 - we configure dropwizard with ConfiguredAssetsBundle to serve the static 
files and IndexPageBundle to serve the index.html on multiple URLs (but if 
you use a # as a base in your index.html, you don't need to do things as 
complicated as we do, the default settings for the mappings should be 
enough). See 
and maybe also this discussion too 
 - we map the backend to /api. See 
 - the frontend queries /api/...

>From there, you should have enough to serve the frontend with the backend.

As for the security, it should be handled at the jetty level I guess, 
because the pages are served by jetty, so you may need to configure either 
shiro, pac4j or any other servlet compliant security framework to add 
filters to protect the pgase themselves.
Another solution (it is what we do in our application), is to only manage 
security at the backend level and we made the frontend take care of showing 
the right errors or login pages…

Le mardi 11 octobre 2016 18:54:07 UTC+2, Roman Rybak a écrit :
> Hello All
> We make service based on AngularJS + Dropwizard. I have two questions : 
>    1. How to connect to the context Dropwizard a full client codes on 
>    AngularJS(html, js, css)?
>    2. How to configure the protection html pages(js, css) only for 
>    authorized users? (like in Spring, it's WebSecurityConfigurer: 
> https://spring.io/blog/2013/07/03/spring-security-java-config-preview-web-security/#customwebsecurityconfigureradapter
>    )

You received this message because you are subscribed to the Google Groups 
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dropwizard-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to