@@ -0,0 +1,1198 @@
+package com.raj.frs.util;%0D%0A%0D%0A%0D%0Aimport org.springframework.beans.factory.annotation.Autowired;%0D%0A%0D%0Aimport com.raj.frs.bean.CredentialsBean;%0D%0Aimport com.raj.frs.dao.CredentialsDAO;%0D%0A%0D%0Apublic class AuthenticationImpl implements Authentication %7B%0D%0A%09@Autowired %0D%0A%09private CredentialsDAO  credentialsDAO;%0D%0A%09public boolean authenticate(CredentialsBean credentialsBean)%0D%0A%09%7B%0D%0A%09 String seq= credentialsDAO.findSequence();%0D%0A%09 String id=credentialsBean.getUserType()+seq;%0D%0A%09 credentialsBean.setUserID(id);%0D%0A%09%09if(credentialsBean!=null%7C%7CcredentialsBean.getUserID()!=null%7C%7CcredentialsBean.getPassword()!=null)%0D%0A%09%09%7B%0D%0A%09%09%09String id1=credentialsBean.getUserID();%0D%0A%09%09%09CredentialsBean cb=credentialsDAO.findByID(id1);%0D%0A%09%09%09if(cb!=null)%0D%0A%09%09%09%7B%0D%0A%09%09%09return true;%0D%0A%09%09%09%7D%0D%0A%09%09%7D%0D%0A%09%09return false;%0D%0A%09%09%0D%0A%09%7D%0D%0A%09public boolean changeLoginStatus(CredentialsBean credentialsBean, int loginStatus)%0D%0A%09%7B%0D%0A%09%09return credentialsDAO.updateCredentials(credentialsBean.getUserID(), loginStatus);%0D%0A%09%09%0D%0A%09%7D%0D%0A%09@Override%0D%0A%09public String authorize(String userId) %7B%0D%0A%09CredentialsBean cb=credentialsDAO.findByID(userId);%0D%0A%09String s=cb.getUserType();%0D%0A%09%0D%0A%09if(s.equalsIgnoreCase(%22A%22))%0D%0A%09%7B%0D%0A%09%09return %22SUCCESS%22;%0D%0A%09%7D%0D%0A%09else%0D%0A%09%0D%0A%09%7B%0D%0A%09%09return %22FAIL%22;%0D%0A%09%7D%0D%0A%09%7D%0D%0A%7D%0D%0A

Add AuthenticationImpl