|
14 | 14 |
|
15 | 15 | package org.cloudfoundry.identity.uaa.authentication; |
16 | 16 |
|
17 | | -import com.fasterxml.jackson.core.type.TypeReference; |
18 | 17 | import org.cloudfoundry.identity.uaa.codestore.ExpiringCode; |
19 | 18 | import org.cloudfoundry.identity.uaa.codestore.ExpiringCodeStore; |
20 | 19 | import org.cloudfoundry.identity.uaa.constants.OriginKeys; |
|
60 | 59 | */ |
61 | 60 | public class PasscodeAuthenticationFilter extends BackwardsCompatibleTokenEndpointAuthenticationFilter { |
62 | 61 |
|
63 | | - private final Logger logger = LoggerFactory.getLogger(getClass()); |
64 | | - |
65 | 62 | private List<String> parameterNames = List.of(); |
66 | 63 |
|
67 | 64 | public PasscodeAuthenticationFilter(UaaUserDatabase uaaUserDatabase, AuthenticationManager authenticationManager, OAuth2RequestFactory oAuth2RequestFactory, ExpiringCodeStore expiringCodeStore) { |
@@ -249,30 +246,6 @@ protected Authentication extractCredentials(HttpServletRequest request) { |
249 | 246 | return null; |
250 | 247 | } |
251 | 248 |
|
252 | | - private Map<String, String> getCredentials(HttpServletRequest request) { |
253 | | - Map<String, String> credentials = new HashMap<>(); |
254 | | - |
255 | | - for (String paramName : parameterNames) { |
256 | | - String value = request.getParameter(paramName); |
257 | | - if (value != null) { |
258 | | - if (value.startsWith("{")) { |
259 | | - try { |
260 | | - Map<String, String> jsonCredentials = JsonUtils.readValue(value, |
261 | | - new TypeReference<>() { |
262 | | - }); |
263 | | - credentials.putAll(jsonCredentials); |
264 | | - } catch (JsonUtils.JsonUtilException e) { |
265 | | - logger.warn("Unknown format of value for request param: {}. Ignoring.", paramName); |
266 | | - } |
267 | | - } else { |
268 | | - credentials.put(paramName, value); |
269 | | - } |
270 | | - } |
271 | | - } |
272 | | - |
273 | | - return credentials; |
274 | | - } |
275 | | - |
276 | 249 | public void setParameterNames(List<String> parameterNames) { |
277 | 250 | this.parameterNames = parameterNames; |
278 | 251 | } |
|
0 commit comments