Ejemplo n.º 1
0
  /*
   * Check for the AuthContext Exceptions
   */
  private void checkACException(AuthXMLResponse authResponse, AuthContextLocal acl) {
    AuthLoginException ale = acl.getLoginException();
    if (ale == null) {
      return;
    }

    /*
     * this code does not allow client to remotely select locale.
     * but this is a problem comes with the AuthContext API, cannot
     * be simply solved here.
     */
    if ((ale.getL10NMessage(locale) != null) && ((ale.getL10NMessage(locale)).length() > 0)) {
      authResponse.setErrorMessage(ale.getL10NMessage(locale));
    }
    authResponse.setIsException(true);
  }