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

  • SEARCH
  • Home
  • 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 9188843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:06:36+00:00 2026-06-17T20:06:36+00:00

Does anyone know in Spring a way to implement a user-service or authentication provider

  • 0

Does anyone know in Spring a way to implement a user-service or authentication provider that will accept any user when logging in?

This is further to my previous question: spring-ws get username & password

I have a basic security setup in my spring-ws project:

<security:http auto-config="true">
    <security:intercept-url pattern="/**" access="ROLE_USER" />
    <security:intercept-url pattern="/*.wsdl" access="ROLE_USER" />
    <security:http-basic/>
</security:http>

<security:authentication-manager erase-credentials="false">
    <security:authentication-provider user-service-ref="userService">
        <security:user-service>
            <security:user name="me" password="mypass"
                authorities="ROLE_USER" />
        </security:user-service>
    </security:authentication-provider>
</security:authentication-manager>

I don’t want to specify users in the user-service, I want a user with any details to have access, I simply want to make sure the user gives a username and password and to ensure that I can access this from the SecurityContextHolder.

Is it necessary to implement my own user-service or authentication-provider to do this and if so can anyone point in the direction of an example or provide me with one?

Thanks!

  • 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-17T20:06:37+00:00Added an answer on June 17, 2026 at 8:06 pm

    You need to provide your own AuthenticationProvider i.e. an implementation of the org.springframework.security.authentication.AuthenticationProvider interface.

    <security:authentication-manager alias="authenticationManager">
      <security:authentication-provider ref="myProvider" />
    </security:authentication-manager>
    
    <bean id="myProvider" class="MyProvider"/>
    

    MyProvider can then either delegate to a custom UserDetailsService to set the authorieties (the roles) or set a ROLE_USER directly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know if there any way that I can programmatically create a bean
Does anyone know how to construct a format string in .NET so that the
Does anyone know if it is possible to create a single connection string that
Does anyone know if there is a way to generate different code in the
Does anyone know the easiest way to extract only nouns from a body of
I have Visual Studio 2008 with Resharper, does anyone know if there is any
Does anyone know if there is a way to set a property like a
Does anyone know of a way to get only POST parameters from an HttpServletRequest
Does anyone know how to use preg_replace in a way to change the following
Hey does anyone know if theres a way in Visual Studio to filter the

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.