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 8131937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:13:16+00:00 2026-06-06T09:13:16+00:00

I have implemented spring security to protect sections of our website. I am using

  • 0

I have implemented spring security to protect sections of our website. I am using a DB (MongoDB) to store username/password. I implemented org.springframework.security.core.userdetails.UserDetailsService to lookup the account details from the DB.

I still need to add another feature: account activation. After registration, we send an activation email to a user and if he clicks on it, we mark the account as activated in the DB. Users that have not activated their account, should not be allowed to log in and should be redirected to a page for that.

Any ideas on how to implement? I need to somehow hook into the login process.

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-06T09:13:17+00:00Added an answer on June 6, 2026 at 9:13 am

    Custom AuthenticationManager is not needed. This feature is already available in Spring Security. Take a look to the doc, you can see the enabled property. When you create the user, if you set that property to false and user try to login, Spring will display automatically a message informing the user that account is not active.

    UPDATED

    In order to display Spring error messages, you should use this in the login page:

    <c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented spring security's remember me feature in our app, the way i
I have the following situation: my application's authorization mechanism is implemented using Spring security.
I have a Web app using Spring 3.1.1 and Spring Security 3.1.0. I implemented
Have simple Spring Security webapp with password encoding: <security:authentication-manager alias=authenticationManager> <security:authentication-provider user-service-ref=personService> <security:password-encoder hash=md5
I have implemented spring-security in my application, my spring-security.xml has following form-login tag. <form-login
I have implemented Spring Security in my application. I have used default implementation, i.e.,
hi I have a j2ee application using Spring webflow and Spring Security. I want
I have implemented spring security in controller method. Below is my spring security.xml -->
I'm using S#arp Architecture 1.6 and have implemented the Rhino Security integration as per
I've implemented LDAP authentication using Spring Security 3.1. My security.xml file for that is

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.