Skip to content

Implement authentication filter to protect private pages #6

@aolguin89

Description

@aolguin89

User Story

As a system administrator
I want to protect private pages from unauthorized access
So that only authenticated users can access restricted areas

Description

Create a Servlet Filter that intercepts requests to protected pages and validates session. Redirects to login if not authenticated.

Tasks

  • Create AuthenticationFilter.java in filter/ package
  • Implement doFilter() to check session
  • Configure filter in web.xml for /WEB-INF/views/*
  • Define public URLs that don't require authentication
  • Redirect to login with original URL parameter

Acceptance Criteria

  • Unauthenticated users cannot access /WEB-INF/views/*
  • Filter redirects to login page
  • After login, user returns to originally requested page
  • Public pages (login, index) remain accessible
  • Authenticated users pass through filter

Metadata

Metadata

Assignees

Labels

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions