Securing JAX-RS Endpoints with JWT

In this blog post I’ll show you how to use the JJWT library to issue and verify JSon Web Tokens with JAX-RS endpoints. The idea is to allow an invocation when no token is needed, but also, be able to reject an invocation when a JWT token is explicitly needed. Let’s say we have a REST Endpoint with several methods: methods that can be invoked directly, and methods that … Continue reading Securing JAX-RS Endpoints with JWT

Your tests assume that JBoss is up and running

As a Java EE developer I tend to mix unit tests with integrations tests, usually using Arquillian. But sometimes, for obscure reasons, Arquillian cannot do the job (let’s say the packaging of the application to test is too obscur). So I want to deploy my application, and then, execute some tests. But what I really want is my tests to be executed if and only if the … Continue reading Your tests assume that JBoss is up and running

Test your JAX-RS 2.0 Web Service URIs… Without Mocks

After the announcement of the NoMock Movement I had to write another post about integration testing. Here it goes  : how to test your nice RESTful URIs ? Use Case Often you hear that URIs have to be expressive… and you want to test that your URIs are nicely written. How do you do that ? Unit testing with mock frameworks such as Restito or … Continue reading Test your JAX-RS 2.0 Web Service URIs… Without Mocks