[daisy] Custom AuthenticationScheme
Kevin
hellosticky at gmail.com
Thu Jun 7 14:34:06 CDT 2007
Hi,
I've read the daisy docs about custom authentication schemes, but I'm
having difficulty deploying my code. I've followed the LDAP code, but
it doesn't appear work. Here is what I've done:
I added a class SimpleBluepagesAuthenticationFactory which extends
AbstractAuthenticationFactory and implements Configurable.
I added a class SimpleBluepagesAuthenticationScheme which implements
AuthenticationScheme.
I built a JAR with those classes as well as a BLOCK-INF directory and
the following block.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<container name="bluepages">
<component name="bluepagesLdap"
class="com.ibm.daisy.authentication.impl.BluepagesAuthenticationFactory">
<configuration>
</configuration>
</component>
<component name="bluepagesSimple"
class="com.ibm.daisy.authentication.impl.SimpleBluepagesAuthenticationFactory">
<configuration>
</configuration>
</component>
<classloader>
<classpath>
<repository>
<resource id="ibm:ibm_bluepages_authentication" version="1.0"/>
</repository>
</classpath>
</classloader>
</container>
I exported this JAR to \repository\server\DAISY_MERLIN_REPO\daisy\jars\
I added the following into myconfig.xml:
<target path="/daisy/repository/authentication/bluepagesSimple">
<configuration>
<scheme name="bluepagesSimple" description="Simple Bluepages
authentication">
<cache enabled="true" maxCacheSize="3000" maxCacheDuration="1800000"/>
<autoCreateUser>
<roles>
<role>User</role>
</roles>
<defaultRole>User</defaultRole>
<updateableByUser>true</updateableByUser>
</autoCreateUser>
</scheme>
</configuration>
</target>
Then I updated this element in myconfig.xml:
<target path="/daisy/repository/authentication/authenticator">
<configuration>
<!-- Indicates which authentication scheme to use, if any, to
automatically create new users. -->
<authenticationSchemeForUserCreation>bluepagesSimple</authenticationSchemeForUserCreation>
</configuration>
</target>
I added a System.out.println in all of the methods of my
SimpleBluepagesAuthenticationFactory, but I do not see the output
anywhere.
The first question is: where would a System.out.println go? Would it
go to the console that start-repository was started under or would it
go to the logs directory under \repository\server\logs, or somewhere
else? I will need to know this for debugging in the future once I get
this installation to work.
Second question is: did I do everything required or did I miss a step?
Thanks!
Kevin
More information about the daisy
mailing list