com.kintone.client.model.PasswordAuth Maven / Gradle / Ivy
// Generated by delombok at Fri Jan 21 13:34:53 JST 2022
package com.kintone.client.model;
import java.util.Base64;
import java.util.HashMap;
import java.util.Map;
class PasswordAuth implements Auth {
private static final String HEADER_NAME = "X-Cybozu-Authorization";
private final String username;
private final String password;
@Override
public Map getHeaders() {
String body = username + ":" + password;
String headerValue = Base64.getEncoder().encodeToString(body.getBytes());
Map headers = new HashMap<>();
headers.put(HEADER_NAME, headerValue);
return headers;
}
@java.beans.ConstructorProperties({"username", "password"})
@java.lang.SuppressWarnings("all")
PasswordAuth(final String username, final String password) {
this.username = username;
this.password = password;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy