stevearmstrong-dev opened a new pull request, #924:
URL: https://github.com/apache/tomcat/pull/924

   ## Summary
   
   This PR implements a logout function for both the Manager and Host-Manager 
webapps, addressing Bug #62048.
   
   ## Changes
   
   ### Manager Webapp:
   - **Constants.java**: Updated `MANAGER_SECTION` to support 5 columns (added 
logout link)
   - **HTMLManagerServlet.java**: 
     - Added logout link in navigation (args[9], args[10])
     - Implemented `/html/logout` command handler
   - **LocalStrings.properties**: Added `htmlManagerServlet.logout=Logout`
   
   ### Host-Manager Webapp:
   - **host/Constants.java**: Updated `MANAGER_SECTION` to support 5 columns
   - **host/HTMLHostManagerServlet.java**:
     - Added logout link in navigation (args[9], args[10])
     - Implemented `/html/logout` command handler
   - **host/LocalStrings.properties**: Added 
`htmlHostManagerServlet.logout=Logout`
   
   ## Implementation Details
   
   The logout functionality works as follows:
   1. User clicks the "Logout" link in the navigation bar
   2. HTTP session is invalidated via `request.getSession(false).invalidate()`
   3. Server sends HTTP 401 Unauthorized with WWW-Authenticate header
   4. Browser clears cached credentials
   5. User sees "You have been logged out" message with a link to log back in
   
   ## Test Plan
   
   - [x] Code compiles successfully
   - [x] Build passes with no errors
   - [x] Follows Tomcat coding conventions (4-space indentation, 120 char line 
width)
   - [x] No whitespace errors or tabs
   
   ## Related Issues
   
   Fixes: Bug #62048 - Missing logout function in Manager and Host-Manager 
webapps


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to