
com.aeontronix.anypointsdk.auth.AnypointUPWAuthenticationHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of anypoint-sdk Show documentation
Show all versions of anypoint-sdk Show documentation
Anypoint Software Development Toolkit
package com.aeontronix.anypointsdk.auth;
import com.aeontronix.commons.URLBuilder;
import com.aeontronix.commons.exception.UnexpectedException;
import com.aeontronix.restclient.RESTClient;
import com.aeontronix.restclient.RESTException;
import com.aeontronix.restclient.RESTResponse;
import com.aeontronix.restclient.ResponseConversionException;
import com.aeontronix.restclient.auth.AuthenticationException;
import com.aeontronix.restclient.json.JsonConvertionException;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
public class AnypointUPWAuthenticationHandler extends AnypointAuthenticationHandler {
private String username;
private String password;
private ObjectMapper objectMapper = new ObjectMapper();
public AnypointUPWAuthenticationHandler(String username, String password) {
this.username = username;
this.password = password;
}
@Override
public boolean isRefreshRequired() {
return authzHeader == null;
}
@Override
public boolean isRefreshable() {
return true;
}
@SuppressWarnings("unchecked")
@Override
public void refreshCredential(RESTClient restClient) throws RESTException, AuthenticationException {
final HashMap
© 2015 - 2025 Weber Informatics LLC | Privacy Policy