Fix CredentialsPassword model

This commit is contained in:
Stefan Kalscheuer 2017-08-02 16:44:29 +02:00
parent af7b99587f
commit c24d1cae0b

View File

@ -34,15 +34,23 @@ import java.util.Map;
@JsonIgnoreProperties(ignoreUnknown = true)
public final class CredentialsResponse extends SecretResponse {
/**
* @return Username
*/
public String getUsername() {
if (get("username") != null)
return get("username").toString();
Object username = get("username");
if (username != null)
return username.toString();
return null;
}
/**
* @return Password
*/
public String getPassword() {
if (get("username") != null)
return get("username").toString();
Object password = get("password");
if (password != null)
return password.toString();
return null;
}
}