Fixing Basic authentication
This commit is contained in:
@@ -13,7 +13,7 @@ public class AboutDialog extends JDialog {
|
||||
public static final int WIDTH = 740;
|
||||
public static final int HEIGHT = 500;
|
||||
|
||||
public static final String VERSION = "0.1.5";
|
||||
public static final String VERSION = "0.1.5.1";
|
||||
|
||||
private JPanel contentPane;
|
||||
private JLabel version;
|
||||
|
||||
@@ -66,12 +66,15 @@ public class AuthorizationDialog extends JDialog {
|
||||
private void onOK() {
|
||||
String type = (String) typeBox.getSelectedItem();
|
||||
switch (Objects.requireNonNull(type)) {
|
||||
case "Basic" -> finalValue = Tools.toBase64(
|
||||
case "Basic" -> finalValue = String.format(
|
||||
"Basic %s",
|
||||
Tools.toBase64(
|
||||
String.format(
|
||||
"%s:%s",
|
||||
usernameBasicField.getText(),
|
||||
passwordBasicField.getText()
|
||||
)
|
||||
)
|
||||
);
|
||||
case "Bearer" -> finalValue = String.format("Bearer %s", bearerTokenField.getText());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user