@Override public void clear() { this.headers.clear(); }
@Override public void clear() { this.headers.clear(); }
public void clear() { parameters.clear(); }
private void resetHierarchicalComponents() { this.userInfo = null; this.host = null; this.port = null; this.pathBuilder = new CompositePathComponentBuilder(); this.queryParams.clear(); }
/** * Clear the collected events, allowing for reuse of the collector. */ public void clear() { this.content.clear(); }
/** * Set the query parameter values overriding all existing query values. * @param params the query parameter name * @return this UriComponentsBuilder * @since 4.2 */ @Override public UriComponentsBuilder replaceQueryParams(@Nullable MultiValueMap<String, String> params) { this.queryParams.clear(); if (params != null) { this.queryParams.putAll(params); } return this; }
static void cleanup() { TestImportGroup.classLoader = null; TestImportGroup.beanFactory = null; TestImportGroup.resourceLoader = null; TestImportGroup.environment = null; TestImportGroup.instancesCount = new AtomicInteger(); TestImportGroup.imports.clear(); }
/** * Set the query of this builder overriding all existing query parameters. * @param query the query string; a {@code null} value removes all query parameters. * @return this UriComponentsBuilder */ @Override public UriComponentsBuilder replaceQuery(@Nullable String query) { this.queryParams.clear(); if (query != null) { query(query); } resetSchemeSpecificPart(); return this; }
private void resetHierarchicalComponents() { this.userInfo = null; this.host = null; this.port = null; this.pathBuilder = new CompositePathComponentBuilder(); this.queryParams.clear(); }
/** * Set the query parameter values overriding all existing query values. * @param params the query parameter name * @return this UriComponentsBuilder * @since 4.2 */ @Override public UriComponentsBuilder replaceQueryParams(@Nullable MultiValueMap<String, String> params) { this.queryParams.clear(); if (params != null) { this.queryParams.putAll(params); } return this; }
this.queryParams.clear();
@After public void tearDown() { this.headers.clear(); }
/** * Set the query of this builder overriding all existing query parameters. * @param query the query string; a {@code null} value removes all query parameters. * @return this UriComponentsBuilder */ @Override public UriComponentsBuilder replaceQuery(@Nullable String query) { this.queryParams.clear(); if (query != null) { query(query); } resetSchemeSpecificPart(); return this; }
this.queryParams.clear(); query(uri.getRawQuery());
this.queryParams.clear();
this.queryParams.clear(); query(uri.getRawQuery());
private void exchangeCodeForToken(String clientId, String redirectUri, String clientSecret, String value, MultiValueMap<String, String> formData) { formData.clear(); formData.add("client_id", clientId); formData.add("redirect_uri", redirectUri); formData.add("grant_type", GRANT_TYPE_AUTHORIZATION_CODE); formData.add("code", value); HttpHeaders tokenHeaders = new HttpHeaders(); tokenHeaders.set("Authorization", testAccounts.getAuthorizationHeader(clientId, clientSecret)); @SuppressWarnings("rawtypes") ResponseEntity<Map> tokenResponse = serverRunning.postForMap("/oauth/token", formData, tokenHeaders); assertEquals(HttpStatus.OK, tokenResponse.getStatusCode()); @SuppressWarnings("unchecked") Map<String, String> body = tokenResponse.getBody(); Jwt token = JwtHelper.decode(body.get("access_token")); assertTrue("Wrong claims: " + token.getClaims(), token.getClaims().contains("\"aud\"")); assertTrue("Wrong claims: " + token.getClaims(), token.getClaims().contains("\"user_id\"")); }
public static class RegexMatcher extends TypeSafeMatcher<String> { private final String regex; public RegexMatcher(final String regex) { this.regex = regex; } @Override public void describeTo(final Description description) { description.appendText("matches regex=`" + regex + "`"); } @Override public boolean matchesSafely(final String string) { return string.matches(regex); } public static RegexMatcher matchesRegex(final String regex) { return new RegexMatcher(regex); } }
userAttributes.clear(); manager.populateAuthenticationAttributes(uaaAuthentication, mock(Authentication.class), null); verify(manager.getUserDatabase(), never()).storeUserInfo(anyString(), any());
formData.clear(); formData.add(USER_OAUTH_APPROVAL, "true"); formData.add(DEFAULT_CSRF_COOKIE_NAME, IntegrationTestUtils.extractCookieCsrf(response.getBody())); location.matches(resource.getPreEstablishedRedirectUri() + ".*code=.+")); formData.clear(); formData.add("client_id", resource.getClientId()); formData.add("redirect_uri", resource.getPreEstablishedRedirectUri());