# Cannot find customized authentication implementation class

**URL:** <https://community.ofelia.com/t/cannot-find-customized-authentication-implementation-class/7260>\
**Category:** Q&A\
**Created:** [27 April 2016 07:19 UTC](https://community.ofelia.com/t/cannot-find-customized-authentication-implementation-class/7260 "2016-04-27T07:19:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sean.zhang\_1](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@sean.zhang\_1](https://community.ofelia.com/u/sean.zhang_1)\
**Post date:** [27 April 2016 07:19 UTC](https://community.ofelia.com/t/cannot-find-customized-authentication-implementation-class/7260/1 "2016-04-27T07:19:26Z")

</div>

I am trying to use a customized authentication implementation on 7.2.2. However, I fail to open login page which gives me 500 error and say my implementation class does not exists.

Here are the steps of my work so far:

1. Implemented a new jar package with below code:  
`package com.synale.BonitaAuthentication;

import java.io.Serializable;  
import java.util.Map;

import org.bonitasoft.engine.authentication.AuthenticationConstants;  
import org.bonitasoft.engine.authentication.AuthenticationException;  
import org.bonitasoft.engine.authentication.GenericAuthenticationService;  
import org.bonitasoft.engine.commons.LogUtil;  
import org.bonitasoft.engine.identity.IdentityService;  
import org.bonitasoft.engine.log.technical.TechnicalLogSeverity;  
import org.bonitasoft.engine.log.technical.TechnicalLoggerService;

public class SimpleAuthenticationServiceImpl implements GenericAuthenticationService {

```
private final IdentityService identityService;

private final TechnicalLoggerService logger;

public SimpleAuthenticationServiceImpl(final IdentityService identityService, final TechnicalLoggerService logger) {
    this.identityService = identityService;
    this.logger = logger;
}

public String checkUserCredentials(Map<String, Serializable> credentials) throws AuthenticationException {
	// TODO Auto-generated method stub
	final String methodName = "checkUserCredentials";
	try {
        final String password = String.valueOf(credentials.get(AuthenticationConstants.BASIC_PASSWORD));
        final String userName = String.valueOf(credentials.get(AuthenticationConstants.BASIC_USERNAME));
        if(userName.equals(password))
        	return userName;
    } catch (final Exception sunfe) {
    	if (logger.isLoggable(this.getClass(), TechnicalLogSeverity.TRACE)) {
            logger.log(this.getClass(), TechnicalLogSeverity.TRACE, LogUtil.getLogOnExceptionMethod(this.getClass(), methodName, sunfe));
        }
    }
    return null;
}

```

}  
`

1. Copy compiled jar file to /webapps/bonita/WEB-INF/lib

2. Updated auth.AuthenticationManager in configuration file /client/tenants/1/conf/authenticationManager-config.properties, and give the class name “com.synale.BonitaAuthentication.SimpleAuthenticationServiceImpl”

3. Updated “`<bean id="authenticationService">`” in configuration file /engine-server/work/tenants/1/bonita-tenant-community.xml, and bind to class “com.synale.BonitaAuthentication.SimpleAuthenticationServiceImpl”

May I know what else are still missing?

---

<div class="post-metadata">

**Author:** ![sean.zhang\_1](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@sean.zhang\_1](https://community.ofelia.com/u/sean.zhang_1)\
**Post date:** [27 April 2016 07:37 UTC](https://community.ofelia.com/t/cannot-find-customized-authentication-implementation-class/7260/2 "2016-04-27T07:37:57Z")

</div>

Ok…now I know what is not done correctly…

Basically, step 3 is not required.

After I reverted step 3 back, and keep other changes, now this customized authentication implementation works fine.
