hello all,
  can anyone explain me what happens, for example in the sample acegi application, when the initial form
is submitted to acegi security framework for authentication?
source is this:

<form action="" value='j_acegi_security_check'/>" method="POST" focus="username">
<table border="0" width="100%">

  <tr>
    <th align="right">
      <fmt:message key="username"/>:
    </th>
    <td align="left">
      <input type='text' name='j_username' <c:if test="${not empty param.login_error}">value='<%= session.getAttribute(AuthenticationProcessingFilter.ACEGI_SECURITY_LAST_USERNAME_KEY) %>'</c:if>>
    </td>
  </tr>

  <tr>
    <th align="right">
      <fmt:message key="password" />:
    </th>
    <td align="left">
      <input type='password' name='j_password'>
    </td>
  </tr>


i was wondering if, using myfaces, i can write a managed bean that does the work done by the component that will
process this form

is the 'component in the background' doing just following action or some more complex things are happening?

final UsernamePasswordAuthenticationToken request = .....
                 final Authentication result = authMgr.authenticate(request);

            // Setup a secure ContextHolder (if required)
               if( ContextHolder.getContext() == null || !(ContextHolder.getContext()
                instanceof SecureContext)) {
                    try {
                           ContextHolder.setContext(new SecureContextImpl());
                     } catch(Exception e) {
                              throw new RuntimeException(e);
                     }
               }

where UsernamePasswordAuthenticationToken is created using j_username and j_password?

thanks and regars
 marco

Reply via email to