(String username, String password)
| 100 | } |
| 101 | |
| 102 | private String basic(String username, String password) { |
| 103 | String token = username + ":" + password; |
| 104 | byte[] bytes = token.getBytes(StandardCharsets.ISO_8859_1); |
| 105 | String encoded = Base64.getEncoder().encodeToString(bytes); |
| 106 | return "Basic " + encoded; |
| 107 | } |
| 108 | } |
| 109 | } |