<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Coding Clarity &#187; HTTP</title>
	<atom:link href="http://chrisdail.com/tag/http/feed/" rel="self" type="application/rss+xml" />
	<link>http://chrisdail.com</link>
	<description>Writing simple, clear and readable code.</description>
	<lastBuildDate>Mon, 21 Jun 2010 12:22:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>HTTP Basic Authentication with Apache CXF Revisited</title>
		<link>http://chrisdail.com/2008/08/13/http-basic-authentication-with-apache-cxf-revisited/</link>
		<comments>http://chrisdail.com/2008/08/13/http-basic-authentication-with-apache-cxf-revisited/#comments</comments>
		<pubDate>Wed, 13 Aug 2008 23:09:18 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[CXF]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://chrisdail.com/2008/08/13/http-basic-authentication-with-apache-cxf-revisited/</guid>
		<description><![CDATA[I receive a lot of traffic to my post about HTTP Basic Authentication in Apache CXF. I decided to do a followup to that post to address some of the comments.
I have never tried to use this with Mule but if someone has, please let me know so I can update this post.
I have uploaded [...]]]></description>
			<content:encoded><![CDATA[<p>I receive a lot of traffic to my post about <a href="http://chrisdail.com/2008/03/31/apache-cxf-with-http-basic-authentication">HTTP Basic Authentication in Apache CXF</a>. I decided to do a followup to that post to address some of the comments.</p>
<p>I have never tried to use this with Mule but if someone has, please let me know so I can update this post.</p>
<p>I have uploaded the <a href="http://chrisdail.com/download/BasicAuthAuthorizationInterceptor.java">Java code</a> for the <a href="http://chrisdail.com/download/BasicAuthAuthorizationInterceptor.java">BasicAuthAuthorizationInterceptor class</a>. There are a few changes over the original version. This one includes a Map of authorized users and their corresponding passwords. I believe the original example I created was for Apache CXF 2.0. This version works with Apache CXF 2.1.1.</p>
<p>In the original post, I also did not include a sample of how to use this code in a real application. The following section shows a sample of how to define the security interceptor and enable it on a simple endpoint.</p>
<pre class="brush: xml; ">

&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
    xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
    xmlns:jaxws=&quot;http://cxf.apache.org/jaxws&quot;
    xsi:schemaLocation=&quot;
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd&quot;&gt;

    &lt;bean id=&quot;securityInterceptor&quot; class=&quot;BasicAuthAuthorizationInterceptor&quot;&gt;
      &lt;property name=&quot;users&quot;&gt;
        &lt;map&gt;
          &lt;entry key=&quot;username&quot; value=&quot;password&quot;/&gt;
        &lt;/map&gt;
      &lt;/property&gt;
    &lt;/bean&gt;

    &lt;bean id=&quot;service&quot; class=&quot;sample.Service&quot;/&gt;

    &lt;jaxws:endpoint
      id=&quot;serviceEndpoint&quot;
      implementor=&quot;#service&quot;
      address=&quot;${services.url}/Service&quot;&gt;
      &lt;jaxws:inInterceptors&gt;
        &lt;ref bean=&quot;securityInterceptor&quot;/&gt;
      &lt;/jaxws:inInterceptors&gt;
    &lt;/jaxws:endpoint&gt;
&lt;/beans&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://chrisdail.com/2008/08/13/http-basic-authentication-with-apache-cxf-revisited/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
