<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>lekkimworld.comWeb</title>
    <link>http://lekkimworld.com/categories/web/</link>
    <description>A blog by IBM Champion Mikkel Flindt Heisterberg about IBM Notes/Domino, Websphere, IBM Connections, mobile, web, JavaScript, Java and other appdev topics...</description>
    <language>en</language>
    <copyright>Mikkel Flindt Heisterberg (mh [at] intravision [dot] dk</copyright>
    <pubDate>Fri, 24 May 2013 06:58:33 GMT</pubDate>
    <dc:creator>Mikkel Flindt Heisterberg (mh [at] intravision [dot] dk</dc:creator>
    <dc:date>2013-05-24T06:58:33Z</dc:date>
    <dc:language>en</dc:language>
    <dc:rights>Mikkel Flindt Heisterberg (mh [at] intravision [dot] dk</dc:rights>
    <image>
      <title>lekkimworld.comWeb</title>
      <url>http://lekkimworld.com/categories/web/</url>
    </image>
    <item>
      <title>A TAI code example</title>
      <link>http://lekkimworld.com/2011/06/10/a_tai_code_example.html</link>
      <content:encoded>&lt;p&gt;
To complete &lt;a href="http://lekkimworld.com/tags/tai"&gt;my series posts&lt;/a&gt; on writing Trust Association Interceptors (TAI's) for Websphere Application Server I wanted to show a real-life example. Not a good example necessarily but an example never the less... :-)
&lt;/p&gt;
&lt;p&gt;
The below example is a very simple TAI that simply does the following:
&lt;ol&gt;
&lt;li&gt;The initialize() method reads a cookie name from the configuration done in the Websphere Application Server ISC. It illustrates how you can configure a TAI externally without having to hard code it.&lt;/li&gt;
&lt;li&gt;The isTargetInterceptor() method looks at the request and sees if a cookie with the configured name is available. If yes it continues to process the request and if not it aborts processing (from the TAI point of view).&lt;/li&gt;
&lt;li&gt;The negotiateValidateandEstablishTrust() method does the actual work by simply telling WAS that the username of user is the value from the cookie.&lt;/li&gt;
&lt;/ol&gt;
As you see writing a TAI is very simple but extremely powerful. Imagine what could be done if you did SSO between Websphere Application Server and Lotus Domino.
&lt;/p&gt;
&lt;p&gt;
&lt;pre&gt;
import java.util.Properties;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.ibm.websphere.security.WebTrustAssociationException;
import com.ibm.websphere.security.WebTrustAssociationFailedException;
import com.ibm.wsspi.security.tai.TAIResult;
import com.ibm.wsspi.security.tai.TrustAssociationInterceptor;

public class ExampleTAI implements TrustAssociationInterceptor {
   // declarations
   private String cookie = null;
   
   @Override
   public void cleanup() {
   }

   @Override
   public String getType() {
      return String.format("Example TAI %s", this.getVersion());
   }

   @Override
   public String getVersion() {
      return "1.0";
   }

   @Override
   public int initialize(Properties props) 
      throws WebTrustAssociationFailedException {
      System.out.println("ExampleTAI.initialize()");
      
      // read properties from configuration in WAS
      this.cookie = props.getProperty("cookieName");
      
      // return 0 to indicate success
      return 0;
   }

   @Override
   public boolean isTargetInterceptor(
      HttpServletRequest req) 
      throws WebTrustAssociationException {
      System.out.println("ExampleTAI.isTargetInterceptor()");
      for (Cookie c : req.getCookies()) {
         if (c.getName().equals(this.cookie)) return true;
      }
      return false;
   }

   @Override
   public TAIResult negotiateValidateandEstablishTrust(
      HttpServletRequest req, 
      HttpServletResponse res) 
      throws WebTrustAssociationFailedException {
      System.out.println("ExampleTAI.negotiate...()");
      for (Cookie c : req.getCookies()) {
         if (c.getName().equals(this.cookie)) {
            // send 200 to signal we're okay
            return TAIResult.create(HttpServletResponse.SC_OK, 
                c.getValue());
         }
      }
      
      // not authenticated
      return TAIResult.create(HttpServletResponse.SC_UNAUTHORIZED);
   }

}
&lt;/pre&gt;
&lt;/p&gt;</content:encoded>
      <category domain="http://lekkimworld.com/categories/java/">Java</category>
      <category domain="http://lekkimworld.com/categories/ibm_products/">IBM</category>
      <category domain="http://lekkimworld.com/categories/web/">Web</category>
      <category domain="http://lekkimworld.com/tags/java/">java</category>
      <category domain="http://lekkimworld.com/tags/tai/">tai</category>
      <category domain="http://lekkimworld.com/tags/was/">was</category>
      <category domain="http://lekkimworld.com/tags/websphere/">websphere</category>
      <pubDate>Fri, 10 Jun 2011 12:06:58 GMT</pubDate>
      <guid isPermaLink="false">tag:lekkimworld.com,2011-06-10:default/1307707618593</guid>
      <dc:date>2011-06-10T12:06:58Z</dc:date>
    </item>
    <item>
      <title>XPages OneUI User Interface Developer Documentation</title>
      <link>http://lekkimworld.com/2009/10/13/xpages_oneui_user_interface_developer_documentation.html</link>
      <content:encoded>&lt;p&gt;
&lt;a href="http://www-12.lotus.com/ldd/doc/oneuidoc/docpublic/index.htm"&gt;XPages OneUI User Interface Developer Documentation&lt;/a&gt;
&lt;/p&gt;</content:encoded>
      <category domain="http://lekkimworld.com/categories/ibm_products/">IBM</category>
      <category domain="http://lekkimworld.com/categories/web/">Web</category>
      <category domain="http://lekkimworld.com/tags/notes85/">notes85</category>
      <category domain="http://lekkimworld.com/tags/notes851/">notes851</category>
      <category domain="http://lekkimworld.com/tags/xpages/">xpages</category>
      <pubDate>Tue, 13 Oct 2009 05:36:00 GMT</pubDate>
      <guid isPermaLink="false">tag:lekkimworld.com,2009-10-13:default/1255412160000</guid>
      <dc:date>2009-10-13T05:36:00Z</dc:date>
    </item>
    <item>
      <title>Monitor Your Web Addiction in Firefox</title>
      <link>http://lekkimworld.com/2006/11/09/monitor_your_web_addiction_in_firefox.html</link>
      <content:encoded>&lt;p&gt;
Do you dare to install this plugin for Firefox - I don't...
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.gadgetlounge.net/archives/2006/11/09/monitor-your-web-addiction-in-firefox/"&gt;Gadget Lounge » Monitor Your Web Addiction in Firefox&lt;/a&gt;
&lt;/p&gt;</content:encoded>
      <category domain="http://lekkimworld.com/categories/web/">Web</category>
      <category domain="http://lekkimworld.com/tags/firefox/">firefox</category>
      <pubDate>Thu, 09 Nov 2006 20:30:59 GMT</pubDate>
      <guid isPermaLink="false">tag:lekkimworld.com,2006-11-09:default/1163104259659</guid>
      <dc:date>2006-11-09T20:30:59Z</dc:date>
    </item>
    <item>
      <title>Practical Web Services in IBM Lotus Domino 7: What are Web services and why are they important?</title>
      <link>http://lekkimworld.com/2006/11/07/practical_web_services_in_ibm_lotus_domino_7_what_are_web_services_and_why_are_they_important.html</link>
      <content:encoded>&lt;p&gt;
New web services article by &lt;a href="http://www.nsftools.com"&gt;Julian&lt;/a&gt; on developerWorks: &lt;a href="http://www-128.ibm.com/developerworks/lotus/library/web-services1/"&gt;Practical Web Services in IBM Lotus Domino 7: What are Web services and why are they important?&lt;/a&gt; via &lt;a href="http://www.bruceelgort.com/blogs/be.nsf/plinks/BELT-6VBMU4"&gt;Mr. Elgort&lt;/a&gt;...
&lt;/p&gt;</content:encoded>
      <category domain="http://lekkimworld.com/categories/java/">Java</category>
      <category domain="http://lekkimworld.com/categories/web/">Web</category>
      <category domain="http://lekkimworld.com/tags/java/">java</category>
      <category domain="http://lekkimworld.com/tags/must_read_article/">must_read_article</category>
      <category domain="http://lekkimworld.com/tags/webservices/">webservices</category>
      <pubDate>Tue, 07 Nov 2006 21:34:19 GMT</pubDate>
      <guid isPermaLink="false">tag:lekkimworld.com,2006-11-07:default/1162935259342</guid>
      <dc:date>2006-11-07T21:34:19Z</dc:date>
    </item>
    <item>
      <title>Geek to Live: Top Firefox 2 config tweaks</title>
      <link>http://lekkimworld.com/2006/10/26/geek_to_live_top_firefox_2_config_tweaks.html</link>
      <content:encoded>&lt;p&gt;
&lt;a href="http://www.lifehacker.com/software/firefox-2/geek-to-live--top-firefox-2-config-tweaks-209941.php"&gt;Geek to Live: Top Firefox 2 config tweaks&lt;/a&gt; via Lifehacker.
&lt;/p&gt;</content:encoded>
      <category domain="http://lekkimworld.com/categories/web/">Web</category>
      <category domain="http://lekkimworld.com/tags/firefox/">firefox</category>
      <pubDate>Thu, 26 Oct 2006 18:38:56 GMT</pubDate>
      <guid isPermaLink="false">tag:lekkimworld.com,2006-10-26:default/1161887936295</guid>
      <dc:date>2006-10-26T18:38:56Z</dc:date>
    </item>
    <item>
      <title>It's been a busy browser week...</title>
      <link>http://lekkimworld.com/2006/10/26/its_been_a_busy_browser_week.html</link>
      <content:encoded>&lt;p&gt;
&lt;img src="http://www.mozilla.com/img/firefox-title.png" style="float: right; margin: 5px" /&gt;
Just upgraded my &lt;a href="http://www.getfirefox.com"&gt;Firefox&lt;/a&gt; to version 2.0 and I'm posting this using it. Total time of upgrading the browser was 35 seconds incl. downloading the installer. Nice! Try that with &lt;a href="http://www.microsoft.com/ie"&gt;Internet Explorer&lt;/a&gt;... I have a couple of extensions that no longer work since no compatible versions are available:
&lt;ul&gt;
&lt;li&gt;Qute theme (not an issue since I like the new theme)&lt;/li&gt;
&lt;li&gt;View formatted source&lt;/li&gt;
&lt;li&gt;Live HTTP Headers&lt;/li&gt;
&lt;/ul&gt;
The new version of Firefox adds a number of nice new features such as in-line spellchecking for web-forms.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Update:&lt;/strong&gt; I had to disable one of my extensions called "Tab Mix". When the extension is enabled Firefox refuses to load new pages once the configured homepage(s) has been loaded. Disabling the extension solves the problem.
&lt;/p&gt;</content:encoded>
      <category domain="http://lekkimworld.com/categories/web/">Web</category>
      <category domain="http://lekkimworld.com/tags/firefox/">firefox</category>
      <pubDate>Thu, 26 Oct 2006 14:04:07 GMT</pubDate>
      <guid isPermaLink="false">tag:lekkimworld.com,2006-10-26:default/1161871447246</guid>
      <dc:date>2006-10-26T14:04:07Z</dc:date>
    </item>
    <item>
      <title>Upgraded to IE7</title>
      <link>http://lekkimworld.com/2006/10/24/upgraded_to_ie7.html</link>
      <content:encoded>&lt;p&gt;
This morning I upgraded my production laptop to Internet Explorer 7. The upgrade was without problems and I haven't experienced any problems with it. While I'll continue using &lt;a href="http://www.getfirefox.com"&gt;Firefox&lt;/a&gt; as my preferred browser I still have some e-banking and some customer stuff I need to do through IE (using the nice &lt;a href="https://addons.mozilla.org/firefox/1419/"&gt;IE Tab extension&lt;/a&gt; for Firefox) so it's nice to get the security updates etc. that IE7 affords.
&lt;/p&gt;
&lt;p&gt;
I haven't messed too much around with the IE7 but I'm impressed by what I have seen so far (new favorites, RSS support, tabbed browsing and dedicated search bar). I think it will become a strong competitor to &lt;a href="http://www.getfirefox.com"&gt;Firefox&lt;/a&gt; for the non-geeks among us... :-)
&lt;/p&gt;</content:encoded>
      <category domain="http://lekkimworld.com/categories/web/">Web</category>
      <category domain="http://lekkimworld.com/tags/firefox/">firefox</category>
      <category domain="http://lekkimworld.com/tags/ie7/">ie7</category>
      <pubDate>Tue, 24 Oct 2006 10:06:05 GMT</pubDate>
      <guid isPermaLink="false">tag:lekkimworld.com,2006-10-24:default/1161684365881</guid>
      <dc:date>2006-10-24T10:06:05Z</dc:date>
    </item>
    <item>
      <title>Nice review of IE7</title>
      <link>http://lekkimworld.com/2006/10/24/nice_review_of_ie7.html</link>
      <content:encoded>&lt;p&gt;
&lt;a href="http://www.winsupersite.com/reviews/ie7.asp"&gt;Internet Explorer 7 Review&lt;/a&gt; on the SuperSite for Windows. The review touches on design, new features, security web standards compliance and when and how to upgrade. A nice read.
&lt;/p&gt;</content:encoded>
      <category domain="http://lekkimworld.com/categories/web/">Web</category>
      <category domain="http://lekkimworld.com/tags/ie7/">ie7</category>
      <pubDate>Tue, 24 Oct 2006 07:06:28 GMT</pubDate>
      <guid isPermaLink="false">tag:lekkimworld.com,2006-10-24:default/1161673588822</guid>
      <dc:date>2006-10-24T07:06:28Z</dc:date>
    </item>
  </channel>
</rss>

