<%@ page import="java.util.Date,
                 com.atlassian.jira.ManagerFactory,
                 com.atlassian.jira.util.BuildUtils"%>
<%@ taglib uri="webwork" prefix="webwork" %>
<%@ taglib uri="webwork" prefix="ui" %>
<%@ taglib uri="sitemesh-page" prefix="page" %>
<%@ taglib uri="jiratags" prefix="jira" %>

<html>
<head>
	<title><webwork:text name="'admin.ldap.authentication.successful'"/></title>
</head>

<body>

<page:applyDecorator name="jiraform">
	<page:param name="title"><webwork:text name="'admin.ldap.authentication.successful'"/></page:param>
	<page:param name="width">100%</page:param>
	<page:param name="description">
    <webwork:text name="'admin.ldap.suitable.configuration'"/>
    <ul>
        <li><webwork:text name="'admin.ldap.unpacked.webapp'"/></li>
        <li><webwork:text name="'admin.ldap.war.file'"/>
    </ul>
    <webwork:text name="'admin.ldap.once.in.place'">
        <webwork:param name="'value0'">'<webwork:property value="userName"/>'</webwork:param>
    </webwork:text>
	</page:param>
	<tr>
	<td bgcolor=ffffff colspan=2>
    
    <textarea cols="95" rows="30" readonly="true"><!-- osuser.xml autogenerated by user '<webwork:property value="/remoteUser"/>' on <%= ManagerFactory.getOutlookDateManager().getOutlookDate(request.getLocale()).formatDMY(new Date()) %> for JIRA <%= BuildUtils.getVersion() %> -->
<opensymphony-user>
    <authenticator class="com.opensymphony.user.authenticator.SmartAuthenticator"/>
    
    <provider class="com.opensymphony.user.provider.ldap.LDAPCredentialsProvider">
     <property name="java.naming.factory.initial">com.sun.jndi.ldap.LdapCtxFactory</property>
     <property name="java.naming.provider.url"><webwork:property value="host"/></property>
     <property name="searchBase"><webwork:property value="baseDN"/></property>
     <property name="uidSearchName"><webwork:property value="searchAttribute"/></property>
     <webwork:if test="authenticatedSearch == false"><!-- Initial search is anonymous</webwork:if>
     <property name="java.naming.security.principal"><webwork:property value="bindDN"/></property>
     <property name="java.naming.security.credentials"><webwork:property value="bindPassword"/></property>
     <webwork:if test="authenticatedSearch == false">--></webwork:if>
     <property name="exclusive-access">true</property>
    </provider>

    <provider class="com.atlassian.core.ofbiz.osuser.CoreOFBizCredentialsProvider">
        <property name="exclusive-access">true</property>
    </provider>
    
    <provider class="com.opensymphony.user.provider.ofbiz.OFBizProfileProvider">
        <property name="exclusive-access">true</property>
    </provider>

    <provider class="com.opensymphony.user.provider.ofbiz.OFBizAccessProvider">
        <property name="exclusive-access">true</property>
    </provider>

</opensymphony-user>
    </textarea>
	</td>
	</tr>
    <tr><td bgcolor=ffffff colspan=2><button onClick="javascript:back()"><webwork:text name="'admin.ldap.back'"/></button></td></tr>
 </page:applyDecorator>

</body>
</html>