Expand my Community achievements bar.

Question for "Creating Custom Authentication Providers"

Avatar

Level 2

Hi, all,

I would like to create a custom authentication provider that use user name and password for authentication using Adobe Livecycle ES. From the document, I need to create a class which implements AuthProvider. The AuthProvider interface requires me to implement the following 2 methods.

1. String getConfigName()

2. AuthResponse authenticate(Map credential, List authConfigs)

I have the following questions regarding these 2 methods.

a. What should I return in the getConfigName() method and where can I find the config name?

b. What is the 2nd parameter in the authenticate() method? I saw the doc mention that it is a java.util.List object containing configuration information. So what meant by configuration information? What information can be retrieved from it?

In the User Management admin console, we can import/export a config.xml. Is it related to the 2nd param of the authenticate? If yes, can anyone send me a sample java and the config.xml file which can show me how to use the configurations in config.xml for customer authentication providers?

Many thanks!!

7 Replies

Avatar

Level 8

I've built a few authenticators, and I've always just returned the name of the authenticator with the getConfigName() string:

    public String getConfigName() {
        return "MirageSampleAuthenticator";
    }

The second parameter in the authenticate method is a list of com.adobe.idp.um.spi.authentication.AuthConfigBO objects.  The AuthConfigBO object contains the domain as well as a Map (HashMap) of custom configuration values (read only).  I'll admit that I've not used the configuration values but as I understand it they are related to the config.xml file that you import/export from the AdminUI (Home  > Settings > User Management > Configuration > Manual Configuration).

As I understand it, the Map is generated from the <map> tag, and the keys and values come from the <entry> nodes

<node name="MirageSampleAuthenticator">
                                <map>
                                    <entry key="isSPI" value="true"/>
                                    <entry key="configured" value="true"/>
                                    <entry key="enabled" value="true"/>
                                    <entry key="visibleInUI" value="true"/>
                                    <entry key="allowMultipleConfigs" value="true"/>
                                    <entry key="serviceName" value="MirageAuthenticationService"/>
                                    <entry key="configInstance" value="/Adobe/LiveCycle/Config/UM/Domains/Mirage/AuthConfigs/Mirage_MirageSampleAuthenticator"/>
                                </map>
                            </node>

As I say, I've never had to use the second parameter beyond getting the domain.  I've attached a couple of sample projects.  The custom Authenticator is a very simple one (sort of a HelloWorld), while the other one is slightly more realistic - it gets the user name from a database (althought the password is faked out it could be done the same way.

Avatar

Level 8

Okay, the forum doesn't like zip files.  The attached file is a zip, not a txt.  Try renaming it.

Avatar

Level 2

Thanks!! Hodmi.

However, I can't download the attached file. (Authenticators.zip.txt (1.9 MB) QUEUED)

eg_ckhab@yahoo.com.hk

Avatar

Level 8

Bugger, it looks like my little trick of renaming the zip file didn't work.

I've ripped out just the important java files and renamed them to txt

Avatar

Level 2

Hi Hodmi,

I developed a custom Directory SPI and created a new enterprise domain to use it to pull users from the LDAP user repository. Users are poppulated into Livecycle and seems to be fine (User infomation matches the information which I pull using LDAP Filter).

The problem is that users pulled from this new domain can't authendicate with LDAP credentials. I could post the config.xml file and I don't know how to do it here.

Thanks for your help.

Sam

Avatar

Former Community Member

Hi Sam,

You'll have to add an Authentication Provider along with the Directory Provider in the domain to successfully authenticate the user.

Avatar

Level 2

Hi Amit,

I sure have a LDAP Authentication provider. I don't know how to copy and paste and here I capture a snapshot of the log file.

It's an object casting issue (from GenericUserConfigBO to LDAPUserConfigBO. I was using the spi code provided by Adobe.

Thanks,

Sam

2-19-2013 12-55-51 PM.jpg