HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator(); auth.setUsername(GeneratedClientSettings.USER); auth.setPassword(GeneratedClientSettings.PASS); auth.setPreemptiveAuthentication(true);
HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator(); auth.setUsername(GeneratedClientSettings.USER); auth.setPassword(GeneratedClientSettings.PASS); auth.setPreemptiveAuthentication(true);
HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator(); auth.setUsername(GeneratedClientSettings.USER); auth.setPassword(GeneratedClientSettings.PASS); auth.setPreemptiveAuthentication(true);
new HttpTransportProperties.Authenticator(); authenticator.setUsername(serverUserName); authenticator.setPassword(serverPassword); authenticator.setPreemptiveAuthentication(true); option.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, authenticator);
HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator(); auth.setUsername(GeneratedClientSettings.USER); auth.setPassword(GeneratedClientSettings.PASS); auth.setPreemptiveAuthentication(true);
authenticator.setPassword(pass); authenticator.setPreemptiveAuthentication(true); options.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, authenticator);
String password = config.getPassword(); auth.setUsername(username); auth.setPassword(password);
HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator(); auth.setUsername(GeneratedClientSettings.USER); auth.setPassword(GeneratedClientSettings.PASS); auth.setPreemptiveAuthentication(true);
HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator(); auth.setUsername(GeneratedClientSettings.USER); auth.setPassword(GeneratedClientSettings.PASS); auth.setPreemptiveAuthentication(true);
HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator(); auth.setUsername(GeneratedClientSettings.USER); auth.setPassword(GeneratedClientSettings.PASS); auth.setPreemptiveAuthentication(true);
authenticator.setPassword(pass); authenticator.setPreemptiveAuthentication(true); options.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, authenticator);
HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator(); auth.setUsername(GeneratedClientSettings.USER); auth.setPassword(GeneratedClientSettings.PASS); auth.setPreemptiveAuthentication(true);
authenticator.setPreemptiveAuthentication(true); authenticator.setUsername(username); authenticator.setPassword(password);
/** * Initialize the rest client and set username and password of the user * * @param serverURL server URL * @param username username * @param password password * @throws AxisFault */ private void initializeRestClient(String serverURL, String username, String password) throws AxisFault { HttpTransportProperties.Authenticator authenticator = new HttpTransportProperties.Authenticator(); authenticator.setUsername(username); authenticator.setPassword(password); authenticator.setPreemptiveAuthentication(true); ConfigurationContext configurationContext; try { configurationContext = ConfigurationContextFactory.createDefaultConfigurationContext(); } catch (Exception e) { String msg = "Backend error occurred. Please contact the service admins!"; throw new AxisFault(msg, e); } HashMap<String, TransportOutDescription> transportsOut = configurationContext .getAxisConfiguration().getTransportsOut(); for (TransportOutDescription transportOutDescription : transportsOut.values()) { transportOutDescription.getSender().init(configurationContext, transportOutDescription); } this.restClient = new RestClient(serverURL, username, password); }
public WSUserStoreManager(String userName, String password, String serverUrl, ConfigurationContext configCtxt) throws UserStoreException { try { if (serverUrl != null && !serverUrl.endsWith("/")) { serverUrl += "/"; } stub = new RemoteUserStoreManagerServiceStub(configCtxt, serverUrl + SERVICE_NAME); HttpTransportProperties.Authenticator authenticator = new HttpTransportProperties.Authenticator(); authenticator.setUsername(userName); authenticator.setPassword(password); authenticator.setPreemptiveAuthentication(true); ServiceClient client = stub._getServiceClient(); Options option = client.getOptions(); option.setManageSession(true); option.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, authenticator); } catch (AxisFault e) { handleException(e.getMessage(), e); } }
public Oauth2TokenValidator(String identityURL, String userName, String password) throws MalformedURLException, AxisFault { this.identityURL = identityURL; String adminUserName = userName; String adminPassword = password; //create service client with given url String targetEndpointUrl = identityURL + "/services/OAuth2TokenValidationService.OAuth2TokenValidationServiceHttpsSoap12Endpoint/"; OAuth2TokenValidationServiceStub stub = new OAuth2TokenValidationServiceStub(targetEndpointUrl); oAuth2TokenValidationService = stub; ServiceClient client = stub._getServiceClient(); HttpTransportProperties.Authenticator authenticator = new HttpTransportProperties.Authenticator(); authenticator.setUsername(adminUserName); authenticator.setPassword(adminPassword); authenticator.setPreemptiveAuthentication(true); Options options = client.getOptions(); options.setProperty(HTTPConstants.AUTHENTICATE, authenticator); client.setOptions(options); }
public BasicAuthEntitlementServiceClient(String serverUrl, String userName, String password) { this.serverUrl = serverUrl; authenticator = new HttpTransportProperties.Authenticator(); authenticator.setUsername(userName); authenticator.setPassword(password); authenticator.setPreemptiveAuthentication(true); try { initConfigurationContext(); } catch (AxisFault e) { log.error("Error initializing Axis2 configuration context", e); } catch (Exception e) { log.error("Error initializing default Axis2 configuration context", e); } }
public BasicAuthEntitlementServiceClient(String serverUrl, String userName, String password) { this.serverUrl = serverUrl; authenticator = new HttpTransportProperties.Authenticator(); authenticator.setUsername(userName); authenticator.setPassword(password); authenticator.setPreemptiveAuthentication(true); try { initConfigurationContext(); } catch (AxisFault e) { log.error("Error initializing Axis2 configuration context", e); } catch (Exception e) { log.error("Error initializing default Axis2 configuration context", e); } }
public WSXACMLEntitlementServiceClient(String serverUrl, String userName, String password) { this.serverUrl = serverUrl; authenticator = new HttpTransportProperties.Authenticator(); authenticator.setUsername(userName); authenticator.setPassword(password); authenticator.setPreemptiveAuthentication(true); }
public WSXACMLEntitlementServiceClient(String serverUrl, String userName, String password) { this.serverUrl = serverUrl; authenticator = new HttpTransportProperties.Authenticator(); authenticator.setUsername(userName); authenticator.setPassword(password); authenticator.setPreemptiveAuthentication(true); }