I’m currently working on integrating UPS OAuth 2.0 authentication into an existing legacy codebase, and I’m facing some challenges. The legacy system is written in [vb.net] and has been functioning without modern authentication protocols until now.
UPSSecurity upss = new UPSSecurity();
UPSSecurityServiceAccessToken upssSvcAccessToken = new UPSSecurityServiceAccessToken();
upssSvcAccessToken.AccessLicenseNumber = CarrierConnection.AccessLicenseNumber;
upss.ServiceAccessToken = upssSvcAccessToken;
UPSSecurityUsernameToken upssUsrNameToken = new UPSSecurityUsernameToken();
upssUsrNameToken.Username = CarrierConnection.UserName;
upssUsrNameToken.Password = CarrierConnection.Password;
upss.UsernameToken = upssUsrNameToken;
var shpSvc = new ShipPortTypeClient(endpointConfiguration: ShipPortTypeClient.EndpointConfiguration.ShipPort, remoteAddress:CarrierConnection.url);