From jira-events at lists.jboss.org Fri Apr 18 14:47:47 2008 Content-Type: multipart/mixed; boundary="===============0632782108110876750==" MIME-Version: 1.0 From: Mark Little (JIRA) To: esb-issues at lists.jboss.org Subject: [esb-issues] [JBoss JIRA] Resolved: (JBESB-1391) NTLMConfigurator Date: Fri, 18 Apr 2008 14:47:47 -0400 Message-ID: <4957010.1208544467535.JavaMail.jira@cloud.prod.atl2.jboss.com> In-Reply-To: 3848297.1196720752242.JavaMail.jira@cloud.prod.atl2.jboss.com --===============0632782108110876750== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable [ http://jira.jboss.com/jira/browse/JBESB-1391?page=3Dall ] Mark Little resolved JBESB-1391. -------------------------------- Resolution: Done Assignee: Mark Little > 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 > Assigned To: Mark Little > Fix For: 4.3 > > Original Estimate: 0 minutes > Remaining Estimate: 0 minutes > > 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) thro= ws 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-rea= lm"); > String authScopeDomain =3D properties.getProperty("ntauthscope-do= main"); > = > = > = > 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,authSc= opeHost,authScopeDomain); > AuthScope authScope; > if(authScopeRealm !=3D null && !authScopeRealm.trim().equals(""))= { > authScope =3D new AuthScope(authScopeHost, Integer.parseInt(a= uthScopePort), authScopeRealm); > } else { > authScope =3D new AuthScope(authScopeHost, Integer.parseInt(a= uthScopePort)); > } > 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 --===============0632782108110876750==--