TAILIEUCHUNG - Bắt đầu với IBM Websphere smash - p 25

222 Chapter 9 Security Model def user = [] def groups = []+[] % Hello ${user} Your group(s): % ${g} "Logout The final page we need to add is a logout page. It is always a good practice to provide a means to enable your users to log out of an application. Listing creates a logout page. You often should do some housekeeping on the “user” Global Context and remove any session-like variables that you do not want to persist into the user’s next access to the site. This could include sensitive data that should not be. | 222 Chapter 9 Security Model def user def groups h1 Hello user h1 h2 Your group s h2 ul g - li g li ul h2 a href getRelativeUri Logout a h2 body html The final page we need to add is a logout page. It is always a good practice to provide a means to enable your users to log out of an application. Listing creates a logout page. You often should do some housekeeping on the user Global Context and remove any session-like variables that you do not want to persist into the user s next access to the site. This could include sensitive data that should not be persisted or just as a means of good housekeeping. Listing Logout Page public html head title Logout title head body h1 You have been logged out h1 h2 Return to a href getRelativeUri Home page a . h2 body html Download from Testing the Secure Application 223 Testing the Secure Application At this point we have all the pieces required to test our secure application. Start the application and open your browser to the secure https port defined in the configuration file. In the preceding example we had chosen port number 9443 so your URL is https localhost 9443 . You should be presented with our insecure main landing page without being prompted for a login as shown in back in Figure . Click the link to go to the secure page. If everything is configured properly you will be redirected to the login page see Figure for user authentication. On subsequent attempts to access the secure page after logging in you will have a valid browser token and will not need to log in again. To test out our failed login logic enter either a bad username or wrong password and click Submit. You will be returned to the login page and an appropriate error message will be displayed as seen in Figure . At this point log in using your correct username and password and verify that you .

TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.