From jira-events at lists.jboss.org Mon Dec 3 17:25:52 2007 Content-Type: multipart/mixed; boundary="===============1280153880233272589==" MIME-Version: 1.0 From: Faisal Azizullah (JIRA) To: esb-issues at lists.jboss.org Subject: [esb-issues] [JBoss JIRA] Created: (JBESB-1391) NTLMConfigurator Date: Mon, 03 Dec 2007 17:25:52 -0500 Message-ID: <3848297.1196720752242.JavaMail.jira@cloud.prod.atl2.jboss.com> --===============1280153880233272589== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable NTLMConfigurator ---------------- Key: JBESB-1391 URL: http://jira.jboss.com/jira/browse/JBESB-1391 Project: JBoss ESB Issue Type: Feature Request Security Level: Public (Everyone can see) Components: Rosetta Affects Versions: 4.2.1 Environment: JBOSS ESB 4.2.1 GA Reporter: Faisal Azizullah Fix For: 4.2.1 package org.jboss.soa.esb.http.configurators; /* * *@ author: Faisal Azizullah *@ company : Lewisville ISD * */ import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.Credentials; import org.apache.commons.httpclient.NTCredentials; import org.apache.commons.httpclient.auth.AuthScope; import org.jboss.soa.esb.ConfigurationException; import org.jboss.soa.esb.http.Configurator; import java.util.Properties; /** * HTTP NTLM Authentication Configurator. *

* Properties: *

*

* See HttpClient Authentication Guide. * = * = */ public class AuthNTLM extends Configurator { public void configure(HttpClient httpClient, Properties properties) throws= ConfigurationException { String username =3D properties.getProperty("ntauth-username"); String password =3D properties.getProperty("ntauth-password"); String authScopeHost =3D properties.getProperty("ntauthscope-host"); String authScopePort =3D properties.getProperty("ntauthscope-port"); String authScopeRealm =3D properties.getProperty("ntauthscope-realm= "); String authScopeDomain =3D properties.getProperty("ntauthscope-doma= in"); = = = assertPropertySetAndNotBlank(username, "ntauth-username"); assertPropertySetAndNotBlank(password, "ntauth-password"); assertPropertySetAndNotBlank(authScopeHost, "ntauthscope-host"); assertPropertyIsInteger(authScopePort, "ntauthscope-port"); assertPropertySetAndNotBlank(authScopeDomain, "ntauthscope-domain"); Credentials creds =3D new NTCredentials(username, password,authScop= eHost,authScopeDomain); AuthScope authScope; if(authScopeRealm !=3D null && !authScopeRealm.trim().equals("")) { authScope =3D new AuthScope(authScopeHost, Integer.parseInt(aut= hScopePort), authScopeRealm); } else { authScope =3D new AuthScope(authScopeHost, Integer.parseInt(aut= hScopePort)); } httpClient.getState().setCredentials(authScope, creds); } } -- = This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: htt= p://jira.jboss.com/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira =20 --===============1280153880233272589==--