![]() |
Проблемы с авторизацией. Собственный login.mxml
Народ, помогите, пожалуйста.
Хочу сделать логин форму с помощью Flex. Использую томкат. есть login.mxml Цитата:
Цитата:
Цитата:
|
хм, мож я чего-то не понял, а это авторизация в чем?
|
А что такое j_security_check или, вернее, http://localhost:8080/blablabla/j_security_check ?
EDIT: Упс, сорри, нашел, что это... тут: http://www.junlu.com/msg/4401.html Ну, чесно, вряд ли смогу помочь... как предположение, а что вы получаете если пробуете авторизироваться с ХТМЛ страницы? |
Using authentication to control access to Flex applications
To use authentication to prevent unauthorized access to your Flex application, you typically use the container to set up constraints on resources. You then challenge the user who then submits credentials. These credentials determine the success or failure of the user's login attempt, as the container's authentication logic determines. For example, you can protect the page that the Flex application is returned with, or protect the SWF file itself. You do this in the web.xml file by defining specific URL patterns, as the following example shows: Код:
<web-app>With BASIC authentication, the user enters a username and password in a popup box that the browser creates. To specify that an application uses BASIC authentication, you use the login-config element and its auth-method subelement in the web application's web.xml file, as the following example shows: Код:
<web-app>When you configure FORM authentication, you can specify both a login form and an error form in the web.xml file, as the following example shows: Код:
<web-app>A simple HTML-based form might appears as follows: Код:
<form method="POST" action="j_security_check"> After it is complete, the container populates the browser's security context and provides or denies access to the resource. Flash Player inherits the security context of the underlying browser. As a result, when you make a data service call, the established credentials are used. When a user fails an authentication attempt with invalid credentials, be sure not to return information about which item was incorrect. Instead, use a generic message such as "Your login information was invalid." For application-server specific information about using custom authentication with LiveCycle Data Services, you can use the examples in flex_install_dir/resources/security. Я написал свою логин-форму на флексе, но она не работает, если же использовать код, который написан в примере(написать например с логин форму с помощью html или jsp), все работает прекрасно. j_security_check - это стандартный экшин в томкате. |
Ну, единственное, чем могу помочь... в сообщении об ошибке сказано, что аддресс не найден.
|
или быть может кто-нить поможет, как перевесть на язык flex-а данный кусок кода:
Код:
<form method="POST" action="j_security_check"> |
ну со спринг секьюрити такие манипуляции вроде нормально проходят, вот тут статейка , причем вроде код с вашим схож. я хз конечно, но в самом томкате (настройках и т.д.) проблем быть не может?
|
Billy_bon, в первом посте вы не поленились оформить код соответствующими тегами, а в последующих что-то с вами случилось. Почему?
|
Вроде все настроил сам не знаю как, но вроде завелось. Теперь появилась следующая проблема.
web.xml Код:
<!-- Default login configuration uses form-based authentication -->Пытался поправить web.xml(вместо login.swf написать login.html, который генерируется из swf html-wrapper-ом с помощью build.xml) Код:
<!-- Default login configuration uses form-based authentication -->Цитата:
Повторюсь login.html - создался с помощью строчки в Build.xml Цитата:
Код:
<login-config>Заранее спасибо |
| Часовой пояс GMT +4, время: 20:04. |
Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.