java - how can add two login in one web application? -


i'm working on web application spring. should able access user , admin. user login implemented spring-security.

web-security.xml

<?xml version="1.0" encoding="utf-8"?> <beans:beans xmlns="http://www.springframework.org/schema/security"     xmlns:beans="http://www.springframework.org/schema/beans"      xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"     xmlns:context="http://www.springframework.org/schema/context"     xmlns:mvc="http://www.springframework.org/schema/mvc"     xsi:schemalocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd                         http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd                         http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd                         http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd">      <!-- enables spring security debugging infrastructure, , should          used in development environment -->     <!-- <debug /> -->      <http pattern="/static/**" security="none" />      <http use-expressions="true" >          <!-- setting user permissions here -->          <intercept-url pattern="/login*" access="permitall" />           <!--setting user permissions here -->            <!--end setting user permissions here -->          <form-login login-page="/timeres_login"             authentication-failure-url="/timeres_login?login_error=1"             default-target-url="/userlogin"  />          <logout logout-url="/logout"          logout-success-url="/home"             delete-cookies="jsessionid" invalidate-session="true" />         <access-denied-handler error-page="/accessdenied" />          <custom-filter position="concurrent_session_filter" ref="concurrencyfilter" />           <session-management invalid-session-url="/home?error=sessionexpired"             session-authentication-strategy-ref="sas"             session-authentication-error-url="/timeres_login?error=alreadylogin">         </session-management>      </http>      <beans:bean id="concurrencyfilter"         class="org.springframework.security.web.session.concurrentsessionfilter">         <beans:property name="sessionregistry" ref="sessionregistry" />         <beans:property name="expiredurl" value="/session-expired" />     </beans:bean>      <beans:bean id="sas"         class="org.springframework.security.web.authentication.session.concurrentsessioncontrolstrategy">         <beans:constructor-arg name="sessionregistry"             ref="sessionregistry" />         <beans:property name="maximumsessions" value="1" />     </beans:bean>      <beans:bean id="sessionregistry"         class="org.springframework.security.core.session.sessionregistryimpl" />      <authentication-manager>         <authentication-provider ref="daoauthenticationprovider" />     </authentication-manager>      <beans:bean id="daoauthenticationprovider"         class="org.springframework.security.authentication.dao.daoauthenticationprovider">         <beans:property name="userdetailsservice" ref="userdetailsservice" />         <!-- <beans:property name="passwordencoder" ref="passwordencoder" /> -->     </beans:bean>      <beans:bean id="userdetailsservice"         class="com.timeres.security.authenticationuserdetailservice">     </beans:bean>  <!--    <beans:bean id="passwordencoder" --> <!--        class="org.springframework.security.authentication.encoding.shapasswordencoder"> --> <!--        <beans:constructor-arg index="0" value="256" /> --> <!--    </beans:bean> -->  </beans:beans> 

and want add admin login part.

first want know whether able add 2 different login in 1 web application. if able do, how ? (where should change , classes should implement)


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -