2.8.2017 - After implementing custom authentication using Spring security AuthenticationProvider and it works good but when I implemented JAX-RS .