Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Assuming that there is a <code>applicationContext-security.xml</code> in your WEB-INF. <br> It would be great if you can post your applicationContext-security.xml<br> And also that you have almost default configuration for spring security.</p> <p>I would recommend following.</p> <p>First change your url to <code>/public/get.request?request=getListCommand</code></p> <p>Then add following snippet to applicationContext-security.xml</p> <pre><code>&lt;http use-expressions="true"&gt; &lt;intercept-url pattern="/public/**" access="permitAll" /&gt; &lt;!-- You can add n number of filters here--&gt; &lt;/http&gt; </code></pre> <p>What it will do is bypass security for all the paths under <code>/public/</code>. Reason for changing URL is that you might not want your whole application to be public.</p> <p><strong>Below is Example of my XML.</strong> <br> <strong><em>Please also note that my authentication provider is custom so dont be confused with that. All you need is to look at my <code>&lt;http&gt;</code> section and you will get an idea how to implement in your application.</em></strong></p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;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" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd"&gt; &lt;global-method-security pre-post-annotations="enabled" jsr250-annotations="enabled" secured-annotations="enabled"&gt; &lt;!-- AspectJ pointcut expression that locates our "post" method and applies security that way &lt;protect-pointcut expression="execution(* bigbank.*Service.post*(..))" access="ROLE_TELLER"/&gt; --&gt; &lt;/global-method-security&gt; &lt;http use-expressions="true"&gt; &lt;intercept-url pattern="/favicon.ico" access="permitAll" /&gt; &lt;intercept-url pattern="/static/**" access="permitAll"/&gt; &lt;intercept-url pattern="/login.jsp*" access="permitAll"/&gt; &lt;intercept-url pattern="/Admin/**" access="hasAnyRole('ROLE_SUPER_USER')"/&gt; &lt;form-login login-page="/login.jsp" authentication-failure-url="/login.jsp?login_error=1" /&gt; &lt;http-basic/&gt; &lt;logout logout-success-url="/login.jsp"/&gt; &lt;remember-me user-service-ref="loginService" /&gt; &lt;!-- Uncomment to limit the number of sessions a user can have --&gt; &lt;/http&gt; &lt;authentication-manager&gt; &lt;authentication-provider user-service-ref="loginService"&gt; &lt;password-encoder hash="md5"/&gt; &lt;/authentication-provider&gt; &lt;/authentication-manager&gt; &lt;beans:bean id="loginService" class="com.indyaah.service.LoginService"&gt; &lt;/beans:bean&gt; &lt;beans:bean id="authService" class="com.indyaah.service.AuthService" /&gt; &lt;/beans:beans&gt; </code></pre> <p>As you can see I allow <code>login.jsp</code> and my static content (images/js/css/etc.) to be accessed anonymously meaning without logging in.</p> <p>Hope this help.</p> <p>Let me know if you need further help in understanding.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload