Apache Sling Authentication Service

Clone this repo:
  1. 8630f92 SLING-13353 : prevent unbounded handleLoginFailure/getAnonymousResolver recursion on repeated anonymous login failure by anchela · 26 hours ago master
  2. b8aa904 SLING-13353 : use explicit anonymous resolver marker check by Rishabh Kumar · 10 days ago
  3. 794c684 chore: remove obsolete CLAUDE.md pointer (#30) by Carsten Ziegeler · 11 days ago
  4. 0b9270d SLING-13353 : prevent unbounded handleLoginFailure/getAnonymousResolver recursion on repeated anonymous login failure by Rishabh Kumar · 3 weeks ago
  5. dde2537 SLING-13257: Improve Test Coverage (#27) by Ashok Pelluru · 3 weeks ago

Apache Sling

Build Status Test Status Coverage Sonarcloud Status JavaDoc Maven Central auth License

Apache Sling Authentication Service

This module is part of the Apache Sling project.

The Sling Authentication Service bundle provides the basic mechanisms to authenticate HTTP requests with a JCR repository. Authentication detail extraction is extensible through the Authentication Handler SPI (AuthenticationHandler and JakartaAuthenticationHandler).

This module targets Java 17+ and OSGi Declarative Services (R7 annotations).

Installation

This bundle should be installed into an OSGi framework together with the Apache Sling Framework. Beyond Apache Sling it requires:

  • Apache Commons Codec 1.13+

Optional integrations (if available in the runtime):

  • Apache Sling Commons Metrics 1.2.8+
  • Apache Felix Health Check API 2.0.0+
  • Apache Sling JCR API 2.0.4+

Build

mvn package

Useful commands:

mvn test
mvn verify
mvn package -DskipTests
mvn clean package
mvn install

API and Runtime Notes

  • Supports both legacy javax.servlet (4.0.1) and Jakarta Servlet (jakarta.servlet 6.1.0) based authentication handlers.
  • Internal implementation classes live in org.apache.sling.auth.core.impl; public SPI is in org.apache.sling.auth.core.spi.
  • Metrics, health check, and some JCR-related packages are imported as optional OSGi dependencies.

Project Structure

pom.xml
bnd.bnd
src/
  main/java/org/apache/sling/auth/core/
    spi/
    impl/
      engine/
      hc/
  test/java/org/apache/sling/auth/core/