INNER CODE UNIT · Java

getPath

pac4j/play-pac4j · shared/src/main/java/org/pac4j/play/PlayWebContext.java:202

    public String getPath() {
        return javaRequest.path();
    }

    @Override
    public void addResponseCookie(final Cookie cookie) {
        // Check if the cookie already exists in the request with the same value
        final Optional<Http.Cookie> existingCookie = javaRequest.cookies().get(cookie.getName());
        if (existingCookie.isPresent()) {
            final Http.Cookie existing = existingCookie.get();
            // If the cookie value hasn't changed, don't add it to response
            if (existing.value().equals(cookie.getValue())) {
                logger.trace("Skip adding response cookie {} as it already exists with same value", cookie.getName());
                return;
            }
        }

        final Http.CookieBuilder cookieBuilder =

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…