title: How to process login with spring security core and grails
body: <p>I have integrated spring security core in my grails project and then s2-quickstart too.</p>
  
  <p>So I got all the basic gsps, domain controllers also.</p>
  
  <p>So I have one user with id = 'me' and password (encoded) = 'password' inside the database with role = 'ROLE_ADMIN'.</p>
  
  <p>Now I am confuse with the api classes that they have. I need to show the login page on the start of my project and if user enters the correct id password then it should redirect to dashboard page. So for that I have written following piece of code :</p>
  
  <pre><code>UrlMapping.groovy
  =================
  "/"(controller:"login", action:"auth")
  
  LoginController.groovy
  ======================
  class LoginController {
  def authenticationTrustResolver
  def springSecurityService
  
  def index = {
         redirect(action: 'auth', params: params)
  }
  def auth = {
         //Checking Licensing stuff
         ....
         ....
  
  }
  def signIn = {
          if ( params.username == null )
              redirect(action: 'login')
          def config = SpringSecurityUtils.securityConfig
          if (springSecurityService.isLoggedIn()) {
              def targetUri = "/dashboard/loadDashboard"
              redirect(uri: targetUri)
      }
          else
          {
               println params.username
               println params.password
  
               //Don't know which class I should use here
          }
  }
  
  auth.gsp inside (login directory)
  =================================
  &lt;form action='login/signIn' method='POST' id='loginForm' class='cssform' autocomplete='off'&gt;
  &lt;label for='username'&gt;Login ID&lt;/label&gt;
                      &lt;input type='text' class='text_' name='j_username' id='username' /&gt;
  &lt;label for='password'&gt;Password&lt;/label&gt;
                      &lt;input type='password' class='text_' name='j_password' id='password' /&gt;
  &lt;input type='submit' value='Login' /&gt;
  </code></pre>
  
  <p>So I don't know how should I pass the username and password to which class inside else part of signIn method of LoginController.</p>
  
  <p>Any help would be highly appreciated...</p>