|
15 | 15 |
|
16 | 16 | import com.fasterxml.jackson.core.type.TypeReference;
|
17 | 17 | import com.google.common.collect.Lists;
|
18 |
| -import org.apache.directory.api.util.Base64; |
19 | 18 | import org.apache.http.HttpStatus;
|
20 | 19 | import org.cloudfoundry.identity.uaa.client.UaaClientDetails;
|
21 | 20 | import org.cloudfoundry.identity.uaa.constants.OriginKeys;
|
|
46 | 45 | import org.springframework.mock.web.MockHttpServletResponse;
|
47 | 46 |
|
48 | 47 | import java.time.Instant;
|
| 48 | +import java.util.Base64; |
49 | 49 | import java.util.Collections;
|
50 | 50 | import java.util.HashMap;
|
51 | 51 | import java.util.Map;
|
@@ -207,7 +207,7 @@ void refreshTokenGrant_rejectsAccessTokens_PasswordGrantType() throws Exception
|
207 | 207 | String body = mockMvc.perform(post("/oauth/token")
|
208 | 208 | .accept(MediaType.APPLICATION_JSON_VALUE)
|
209 | 209 | .header("Host", getZoneHostUrl(zone))
|
210 |
| - .header("Authorization", "Basic " + new String(Base64.encode((client.getClientId() + ":" + SECRET).getBytes()))) |
| 210 | + .header("Authorization", "Basic " + new String(Base64.getEncoder().encode((client.getClientId() + ":" + SECRET).getBytes()))) |
211 | 211 | .param("grant_type", GRANT_TYPE_PASSWORD)
|
212 | 212 | .param("client_id", client.getClientId())
|
213 | 213 | .param("client_secret", SECRET)
|
@@ -238,7 +238,7 @@ void refreshTokenGrant_rejectsIdTokens() throws Exception {
|
238 | 238 | String body = mockMvc.perform(post("/oauth/token")
|
239 | 239 | .accept(MediaType.APPLICATION_JSON_VALUE)
|
240 | 240 | .header("Host", getZoneHostUrl(zone))
|
241 |
| - .header("Authorization", "Basic " + new String(Base64.encode((client.getClientId() + ":" + SECRET).getBytes()))) |
| 241 | + .header("Authorization", "Basic " + new String(Base64.getEncoder().encode((client.getClientId() + ":" + SECRET).getBytes()))) |
242 | 242 | .param("grant_type", GRANT_TYPE_PASSWORD)
|
243 | 243 | .param("client_id", client.getClientId())
|
244 | 244 | .param("client_secret", SECRET)
|
|
0 commit comments