SLING-13257: Fix sonar issues
2 files changed
tree: f3e736dd03870d5eb9966978458e298823468267
  1. src/
  2. .asf.yaml
  3. .git-blame-ignore-revs
  4. .gitignore
  5. .sling-module.json
  6. AGENTS.md
  7. bnd.bnd
  8. CLAUDE.md
  9. CODE_OF_CONDUCT.md
  10. CONTRIBUTING.md
  11. Jenkinsfile
  12. LICENSE
  13. pom.xml
  14. README.md
README.md

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/