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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:40:33+00:00 2026-05-16T04:40:33+00:00

I have a grails 1.2 app and I want to use declarative security in

  • 0

I have a grails 1.2 app and I want to use declarative security in order to restrict accesses based on roles. I decided to try shiro, installed the plugin, but when I try to authenticate, the message “Invalid username and/or password” shows up in the header. I check the db entry and the user is there with the sha’ed password. No messages are shown neither in the console nor in the stacktrace file. I added “warn ‘org.jsecurity'” to Config.groovy with no results. Any hints/tricks to troubleshoot this ?

  • 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-05-16T04:40:34+00:00Added an answer on May 16, 2026 at 4:40 am

    I ran into this problem as well… how are you saving the password for the user? After running quick start I followed the example on the Shiro plugin page and added the code below to my bootstrap init method:

    import org.apache.shiro.crypto.hash.Sha512Hash
    
    def user = new ShiroUser(username: "user123", passwordHash: new Sha512Hash("password").toHex())
    user.save()
    

    I would attempt to login and would continue to get a login failed. So I tried

    def user = new ShiroUser(username:'admin', passwordHash:new Sha256Hash("admin").toHex())
    user.save()
    

    After changing from Sha512Hash to Sha256Hash… I was able to login!

    UPDATE: Just created a new app with default Shiro Plugin settings after running ‘quick-start’. If you are to create a user, you are going to want to use Sha256Hash out of the box. However, you can use Sha512Hash or Sha1Hash by adding the bean to your resources.groovy file for Spring.

    Example for Sha512Hash:

    beans = {
      bean {
        credentialMatcher(Sha512CredentialsMatcher) {
          storedCredentialsHexEncoded = true
        }
      }
    }
    

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

Sidebar

Related Questions

My current requirement is: I have to package my grails app and use teamcity
I have a Grails app with acegi security, and I just found some users
For my Grails App i use Searchable Plugin to have an nice google-like Search.
i m new to Grails and using some Shiro security. I have made a
I have a grails app that uses the Spring-Security-Core plugin, which integrates Spring Security
Scenario: I have a Grails app that uses Acegi security for authentication. I'm implementing
I have a grails app that has some run-scripts that I want to run
I want to add some pagination stuff to my grails app. I have the
I have a Grails app that loads its data from xml files and delivers
I have upgraded my grails app from 1.3.7 to 2.0.1. I had few static

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.