Setting an httponly cookie with javax.servlet 2.5

You are right, manually setting header is the right way to achive your goal. You can also use javax.ws.rs.core.NewCookie or any other class with useful toString method to print cookie to a header to make things more simple. public static String getHttpOnlyCookieHeader(Cookie cookie) { NewCookie newCookie = new NewCookie(cookie.getName(), cookie.getValue(), cookie.getPath(), cookie.getDomain(), cookie.getVersion(), cookie.getComment(), cookie.getMaxAge(), … Read more

Laravel 5.6 – Passport JWT httponly cookie SPA authentication for self consuming API?

I’ll try to answer this in a generic way so that the answer is applicable across frameworks, implementations and languages because the answers to all the questions can be derived from the general protocol or algorithm specifications. Which OAuth 2.0 grant type should I use? This is the first thing to be decided. When it … Read more