com.aeontronix.enhancedmule.tools.authentication.AnypointUsernamePasswordCredentials Maven / Gradle / Ivy
/*
* Copyright (c) Aeontronix 2020
*/
package com.aeontronix.enhancedmule.tools.authentication;
import java.util.HashMap;
import java.util.Map;
public class AnypointUsernamePasswordCredentials implements Credentials {
private String username;
private String password;
public AnypointUsernamePasswordCredentials() {
}
public AnypointUsernamePasswordCredentials(String username, String password) {
this.username = username;
this.password = password;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
@Override
public Map toAuthRequestPayload() {
final HashMap map = new HashMap<>();
map.put("type","AN_UPW");
map.put("id",username);
map.put("secret",password);
return map;
}
}