Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9025961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T06:24:17+00:00 2026-06-16T06:24:17+00:00

I have the following code in spring-security.xml <?xml version=1.0 encoding=UTF-8?> <beans xmlns=http://www.springframework.org/schema/beans xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:security=http://www.springframework.org/schema/security

  • 0

I have the following code in spring-security.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:security="http://www.springframework.org/schema/security"
    xsi:schemaLocation="http://www.springframework.org/schema/beans 
            http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
            http://www.springframework.org/schema/security 
            http://www.springframework.org/schema/security/spring-security-3.1.xsd">


    <security:http security="none" pattern="/openid.jsp" />
    <security:http security="none" pattern="/logout.jsp" />
    <security:http security="none" pattern="/success.jsp" />

    <security:http auto-config="true"
        authentication-manager-ref="authManager">
        <security:intercept-url pattern="/**" access="ROLE_USER"/>
        <security:openid-login login-page="/openid.jsp" 
            authentication-failure-url="/logout.jsp"
            default-target-url="/success.jsp" >
        </security:openid-login>
    </security:http>


    <security:authentication-manager id="authManager">
        <security:authentication-provider>
            <security:user-service>
                <security:user name="spring" password="spring"
                    authorities="ROLE_USER" />
            </security:user-service>
        </security:authentication-provider>
    </security:authentication-manager> 

</beans>

Tomcat access logs do show that Google has authenticated the openid but still I hit the logout.jsp after allowing access from Google open id page.

127.0.0.1 - - [13/Dec/2012:22:55:44 +0530] "GET /SpringWebSecurityOpenID/getEmp.do/10 HTTP/1.1" 302 35
127.0.0.1 - - [13/Dec/2012:22:55:44 +0530] "GET /SpringWebSecurityOpenID/openid.jsp HTTP/1.1" 200 258
127.0.0.1 - - [13/Dec/2012:22:55:49 +0530] "POST /SpringWebSecurityOpenID/j_spring_openid_security_check HTTP/1.1" 302 35
127.0.0.1 - - [13/Dec/2012:22:55:50 +0530] "GET /SpringWebSecurityOpenID/j_spring_openid_security_check?openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fud&openid.response_nonce=2012-12-13T17cwcwc4rf32dwfdwGJ5oVQ_g&openid.return_to=http%3A%2F%2Flocalhost%3A8080%2FSpringWebSecurityOpenID%2Fj_spring_openid_security_check&openid.assoc_handle=AMlYA9UzE_QF5BKDYtD-k3_TbEdofnp7-43i9om-guRWh1TG5LhzEN7lzPyJ0IXzTjtNDbZz&openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle&openid.sig=4MN6wuiKCWkuNwfwfwfd32dddqwg%3D&openid.identity=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%cwcwc34r2dwefreWzH1fBOWj5v4U&openid.claimed_id=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid432432EdewedrUfrp0nP3AWzH1fBOWj5v4U HTTP/1.1" 302 35
127.0.0.1 - - [13/Dec/2012:22:55:50 +0530] "GET /SpringWebSecurityOpenID/logout.jsp HTTP/1.1" 200 102

pls. help in troubleshooting this issue. If I remove openid login page attribute and use default open id form generated by Spring then I can easily get authenticated and hit the requested URL.

Have update spring-security.xml code above. The exception seen in the logs is:

2012-12-16 11:26:32,430&#123;HH&#58;mm&#58;ss&#125; DEBUG &#91;http-bio-8080-exec-4&#93; &#40;ConsumerManager.java&#58;1788&#41;
- Local signature verification succeeded.
2012-12-16 11:26:32,430&#123;HH&#58;mm&#58;ss&#125;  INFO &#91;http-bio-8080-exec-4&#93; &#40;ConsumerManager.java&#58;1848&#41;
- Verification succeeded for: https://www.google.com/accounts/o8/id?id=AItOawl2FdNxxWJLrUfrp0nP3AWzH1fBOWj5v4U
2012-12-16 11:26:32,433&#123;HH&#58;mm&#58;ss&#125; DEBUG &#91;http-bio-8080-exec-4&#93; &#40;ProviderManager.java&#58;152&#41; -
 Authentication attempt using org.springframework.security.openid.OpenIDAuthenticationProvider
2012-12-16 11:26:32,434&#123;HH&#58;mm&#58;ss&#125; DEBUG &#91;http-bio-8080-exec-4&#93; &#40;AbstractAuthenticationProcessingFil
ter.java&#58;340&#41; - Authentication request failed: org.springframework.security.core.userdetails.UsernameNotFoundException: h
ttps://www.google.com/accounts/o8/id?id=AItOawl2FdNxxWJLrUfrp0nP3AWzH1fBOWj5v4U
2012-12-16 11:26:32,434&#123;HH&#58;mm&#58;ss&#125; DEBUG &#91;http-bio-8080-exec-4&#93; &#40;AbstractAuthenticationProcessingFil
ter.java&#58;341&#41; - Updated SecurityContextHolder to contain null Authentication
2012-12-16 11:26:32,435&#123;HH&#58;mm&#58;ss&#125; DEBUG &#91;http-bio-8080-exec-4&#93; &#40;AbstractAuthenticationProcessingFil
ter.java&#58;342&#41; - Delegating to authentication failure handlerorg.springframework.security.web.authentication.SimpleUrlAuth
enticationFailureHandler@e9927a

Do I need to add the user I want to authenticate in spring-security.xml. I was trying to allow anybody with valid openid to login. I don’t have any list of users to authenticate.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T06:24:19+00:00Added an answer on June 16, 2026 at 6:24 am

    For your interceptor url try this instead of a role.

    <security:intercept-url pattern="/**" access="isFullyAuthenticated()"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code: String website = http://www.somewebsite.com/; Document doc = Jsoup.connect(website).get(); Elements
On the client side i have the following spring bean: <bean id=partneriLogicImpl class=org.springframework.remoting.caucho.HessianProxyFactoryBean> <property
We have a Spring managed bean with an @EJB field import org.springframework.security.web.authentication.logout.LogoutHandler; public class
I have a Spring Batch process which has following kind of code. <step id=step1
In reference to this question ( Server returned HTTP response code: 400 using Spring-Security
I have very similar spring-security beans configuation to this example . The @Secured annotation
I have the following Code to display Data from the Database in XML Document
I have the following code string three() { return three; } void mutate(string& ref)
I have the following code: string acctStatus = account.AccountStatus.ToString(); if (!SettableStatuses().Any(status => status ==
I have the following code: String serviceType; ServiceBrowser tmpBrowser; for (String playerName: players) {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.