Java Code Examples for org.eclipse.jetty.util.MultiMap#keySet()
The following examples show how to use
org.eclipse.jetty.util.MultiMap#keySet() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JettyAdapterSessionStore.java From keycloak with Apache License 2.0 | 6 votes |
public void saveRequest() { // remember the current URI HttpSession session = myRequest.getSession(); synchronized (session) { // But only if it is not set already, or we save every uri that leads to a login form redirect if (session.getAttribute(FormAuthenticator.__J_URI) == null) { StringBuffer buf = myRequest.getRequestURL(); if (myRequest.getQueryString() != null) buf.append("?").append(myRequest.getQueryString()); session.setAttribute(FormAuthenticator.__J_URI, buf.toString()); session.setAttribute(JettyHttpFacade.__J_METHOD, myRequest.getMethod()); if ("application/x-www-form-urlencoded".equals(myRequest.getContentType()) && "POST".equalsIgnoreCase(myRequest.getMethod())) { MultiMap<String> formParameters = extractFormParameters(myRequest); MultivaluedHashMap<String, String> map = new MultivaluedHashMap<String, String>(); for (String key : formParameters.keySet()) { for (Object value : formParameters.getValues(key)) { map.add(key, (String) value); } } session.setAttribute(CACHED_FORM_PARAMETERS, map); } } } }
Example 2
Source File: JettyAdapterSessionStore.java From keycloak with Apache License 2.0 | 6 votes |
public void saveRequest() { // remember the current URI HttpSession session = myRequest.getSession(); synchronized (session) { // But only if it is not set already, or we save every uri that leads to a login form redirect if (session.getAttribute(FormAuthenticator.__J_URI) == null) { StringBuffer buf = myRequest.getRequestURL(); if (myRequest.getQueryString() != null) buf.append("?").append(myRequest.getQueryString()); session.setAttribute(FormAuthenticator.__J_URI, buf.toString()); session.setAttribute(JettyHttpFacade.__J_METHOD, myRequest.getMethod()); if ("application/x-www-form-urlencoded".equals(myRequest.getContentType()) && "POST".equalsIgnoreCase(myRequest.getMethod())) { MultiMap<String> formParameters = extractFormParameters(myRequest); MultivaluedHashMap<String, String> map = new MultivaluedHashMap<String, String>(); for (String key : formParameters.keySet()) { for (Object value : formParameters.getValues(key)) { map.add(key, (String) value); } } session.setAttribute(CACHED_FORM_PARAMETERS, map); } } } }
Example 3
Source File: JettyAdapterSessionStore.java From keycloak with Apache License 2.0 | 6 votes |
public void saveRequest() { // remember the current URI HttpSession session = myRequest.getSession(); synchronized (session) { // But only if it is not set already, or we save every uri that leads to a login form redirect if (session.getAttribute(FormAuthenticator.__J_URI) == null) { StringBuffer buf = myRequest.getRequestURL(); if (myRequest.getQueryString() != null) buf.append("?").append(myRequest.getQueryString()); session.setAttribute(FormAuthenticator.__J_URI, buf.toString()); session.setAttribute(JettyHttpFacade.__J_METHOD, myRequest.getMethod()); if ("application/x-www-form-urlencoded".equals(myRequest.getContentType()) && "POST".equalsIgnoreCase(myRequest.getMethod())) { MultiMap<String> formParameters = extractFormParameters(myRequest); MultivaluedHashMap<String, String> map = new MultivaluedHashMap<String, String>(); for (String key : formParameters.keySet()) { for (Object value : formParameters.getValues(key)) { map.add(key, (String) value); } } session.setAttribute(CACHED_FORM_PARAMETERS, map); } } } }
Example 4
Source File: JettyAdapterSessionStore.java From keycloak with Apache License 2.0 | 6 votes |
public void saveRequest() { // remember the current URI HttpSession session = myRequest.getSession(); synchronized (session) { // But only if it is not set already, or we save every uri that leads to a login form redirect if (session.getAttribute(FormAuthenticator.__J_URI) == null) { StringBuffer buf = myRequest.getRequestURL(); if (myRequest.getQueryString() != null) buf.append("?").append(myRequest.getQueryString()); session.setAttribute(FormAuthenticator.__J_URI, buf.toString()); session.setAttribute(JettyHttpFacade.__J_METHOD, myRequest.getMethod()); if ("application/x-www-form-urlencoded".equals(myRequest.getContentType()) && "POST".equalsIgnoreCase(myRequest.getMethod())) { MultiMap<String> formParameters = extractFormParameters(myRequest); MultivaluedHashMap<String, String> map = new MultivaluedHashMap<String, String>(); for (String key : formParameters.keySet()) { for (Object value : formParameters.getValues(key)) { map.add(key, (String) value); } } session.setAttribute(CACHED_FORM_PARAMETERS, map); } } } }
Example 5
Source File: JettyAdapterSessionStore.java From keycloak with Apache License 2.0 | 6 votes |
public void saveRequest() { // remember the current URI HttpSession session = myRequest.getSession(); synchronized (session) { // But only if it is not set already, or we save every uri that leads to a login form redirect if (session.getAttribute(FormAuthenticator.__J_URI) == null) { StringBuffer buf = myRequest.getRequestURL(); if (myRequest.getQueryString() != null) buf.append("?").append(myRequest.getQueryString()); session.setAttribute(FormAuthenticator.__J_URI, buf.toString()); session.setAttribute(JettyHttpFacade.__J_METHOD, myRequest.getMethod()); if ("application/x-www-form-urlencoded".equals(myRequest.getContentType()) && "POST".equalsIgnoreCase(myRequest.getMethod())) { MultiMap<String> formParameters = extractFormParameters(myRequest); MultivaluedHashMap<String, String> map = new MultivaluedHashMap<String, String>(); for (String key : formParameters.keySet()) { for (Object value : formParameters.getValues(key)) { map.add(key, (String) value); } } session.setAttribute(CACHED_FORM_PARAMETERS, map); } } } }
Example 6
Source File: JettyAdapterSessionStore.java From keycloak with Apache License 2.0 | 6 votes |
public void saveRequest() { // remember the current URI HttpSession session = myRequest.getSession(); synchronized (session) { // But only if it is not set already, or we save every uri that leads to a login form redirect if (session.getAttribute(FormAuthenticator.__J_URI) == null) { StringBuffer buf = myRequest.getRequestURL(); if (myRequest.getQueryString() != null) buf.append("?").append(myRequest.getQueryString()); session.setAttribute(FormAuthenticator.__J_URI, buf.toString()); session.setAttribute(JettyHttpFacade.__J_METHOD, myRequest.getMethod()); if ("application/x-www-form-urlencoded".equals(myRequest.getContentType()) && "POST".equalsIgnoreCase(myRequest.getMethod())) { MultiMap<String> formParameters = extractFormParameters(myRequest); MultivaluedHashMap<String, String> map = new MultivaluedHashMap<String, String>(); for (String key : formParameters.keySet()) { for (Object value : formParameters.getValues(key)) { map.add(key, (String) value); } } session.setAttribute(CACHED_FORM_PARAMETERS, map); } } } }