Author: abogachuk
Date: 2010-05-05 07:23:53 -0400 (Wed, 05 May 2010)
New Revision: 21902
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml
Log:
https://jira.jboss.org/jira/browse/TOOLSDOC-62 Minor improvements in code listings. Code
listing in section 3.3.1 has been updated.
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml 2010-05-05
08:11:37 UTC (rev 21901)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/first_seam.xml 2010-05-05
11:23:53 UTC (rev 21902)
@@ -467,14 +467,14 @@
start by adding some custom login logic.</para>
<para>Open <property>Authenticator.java</property> in JBoss
Developer Studio and replace the
<property>authenticate()</property> method with this
code:</para>
- <programlisting><![CDATA[public boolean authenticate() {
-if (identity.getUsername().equals("admin")
-&& identity.getPassword().equals("password")) {
-identity.addRole("admin");
-return true;
-}
-else
-return true;
+ <programlisting><![CDATA[public boolean authenticate()
+{
+ if ("admin".equals(credentials.getUsername()))
+ {
+ identity.addRole("admin");
+ return true;
+ }
+ return false;
}]]></programlisting>
</section>
<section id="secure_seam_page">