Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
97d2be4
build(deps): bump go.opentelemetry.io/otel from 1.37.0 to 1.39.0
dependabot[bot] Dec 15, 2025
56d1835
chore: update lib-commons to v2.7.0-beta.3 for multi-tenant support
jeffersonrodrigues92 Jan 6, 2026
d624057
docs: update license to Elastic License 2.0 (ELv2)
qnen Jan 30, 2026
d5ce9b9
chore: update Go version to fix vulnerabilities
qnen Jan 30, 2026
2607a54
build(deps): bump github.com/golang-jwt/jwt/v5 from 5.3.0 to 5.3.1
dependabot[bot] Feb 2, 2026
e6789dc
Merge pull request #67 from LerianStudio/feat/update-code-license-to-…
qnen Feb 3, 2026
ad12708
chore(release): 2.4.1-beta.1
lerian-studio Feb 3, 2026
64c87ff
chore(makefile): add build, test, coverage and git hooks commands
marcelo-lerian Feb 5, 2026
8b166d7
chore(makefile): standardize build system following lib-commons patte…
marcelo-lerian Feb 6, 2026
da45b1a
fix(tests): use safe find -exec instead of xargs pipeline :bug:
marcelo-lerian Feb 6, 2026
667eea3
chore(makefile): remove legacy coverage commands :wrench:
marcelo-lerian Feb 6, 2026
e32ec96
Merge pull request #70 from LerianStudio/fix/makefile
marcelo-lerian Feb 9, 2026
5befee4
chore(release): 2.5.0-beta.1
lerian-studio Feb 9, 2026
a622a53
chore: upgrade lib-commons to v3.0.0-beta.2
jeffersonrodrigues92 Feb 20, 2026
15dc794
Merge pull request #69 from LerianStudio/dependabot/go_modules/develo…
jeffersonrodrigues92 Feb 20, 2026
9690684
chore(release): 2.5.0-beta.2
lerian-studio Feb 20, 2026
f3395ba
build(deps): bump github.com/gofiber/fiber/v2 from 2.52.9 to 2.52.11
dependabot[bot] Feb 20, 2026
c878df8
Merge pull request #68 from LerianStudio/dependabot/go_modules/develo…
jeffersonrodrigues92 Feb 20, 2026
fb4e6da
chore(release): 2.5.0-beta.3
lerian-studio Feb 20, 2026
1c6803d
Merge branch 'develop' into dependabot/go_modules/develop/go.opentele…
jeffersonrodrigues92 Feb 20, 2026
af80836
Merge pull request #61 from LerianStudio/dependabot/go_modules/develo…
jeffersonrodrigues92 Feb 20, 2026
7e61323
chore(release): 2.5.0-beta.4
lerian-studio Feb 20, 2026
b7f7cea
Merge branch 'develop' into feature/multi-tenant
jeffersonrodrigues92 Feb 20, 2026
7dc78fe
Merge pull request #71 from LerianStudio/feature/multi-tenant
jeffersonrodrigues92 Feb 20, 2026
0a19c60
chore(release): 2.5.0-beta.5
lerian-studio Feb 20, 2026
17d4262
test: add first-ever middleware tests for gRPC and HTTP
qnen Feb 26, 2026
f4dae96
feat: make gRPC interceptor tenant-aware with streaming support
qnen Feb 26, 2026
805aadb
fix: replace deprecated commons API calls
qnen Feb 26, 2026
37145a5
Merge branch 'develop' into feat/multi-tenant
qnen Feb 27, 2026
4b6b5c5
chore: fix lint issues
qnen Feb 27, 2026
78150e9
chore: fix lint issues with govet
qnen Feb 27, 2026
44e4e6e
Merge pull request #73 from LerianStudio/feat/multi-tenant
qnen Feb 27, 2026
5b60e5f
chore(release): 2.5.0-beta.6
lerian-studio Feb 27, 2026
a7c724a
chore(deps): upgrade lib-commons from v3 to v4
fredcamaral Mar 10, 2026
2e12d9b
feat(middleware): migrate to lib-commons v4 API
fredcamaral Mar 10, 2026
6ba51e5
fix(auth/middleware): prevent panic on logger initialization failure
fredcamaral Mar 10, 2026
edb0fec
Merge pull request #78 from LerianStudio/feat/migrate-libcommons-v4
fredcamaral Mar 10, 2026
7175a5b
chore(release): 2.5.0-beta.7
lerian-studio Mar 10, 2026
4f51877
fix(auth/middleware): return 401 instead of 500 for malformed tokens
qnen Mar 17, 2026
cd1e64e
Merge pull request #79 from LerianStudio/fix/invalid-token-500-to-401
qnen Mar 17, 2026
72bfae4
chore(release): 2.5.0-beta.8
lerian-studio Mar 17, 2026
165db5f
fix(auth/middleware): handle numeric code field in auth error response
qnen Mar 20, 2026
3b30577
Merge pull request #81 from LerianStudio/fix/unmarshal-numeric-error-…
qnen Mar 20, 2026
a22c8aa
chore(release): 2.5.0-beta.9
lerian-studio Mar 20, 2026
5a83709
chore(deps): bump lib-commons to v4.2.0-beta.9
jeffersonrodrigues92 Mar 21, 2026
bd384b6
chore(deps): bump lib-commons to v4.2.0
jeffersonrodrigues92 Mar 21, 2026
2480366
Merge pull request #82 from LerianStudio/chore/bump-lib-commons-v4.2.…
jeffersonrodrigues92 Mar 21, 2026
8636317
chore(release): 2.5.0-beta.10
lerian-studio Mar 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Go build artifacts
/bin/
/out/
/dist/

# Dependency directories (vendor/)
vendor/
Expand All @@ -17,7 +18,17 @@ vendor/
# Logs and temporary files
*.log
*.tmp
*.out

# Test coverage files
coverage.out
coverage.html
*.coverprofile

# Test reports directory
/reports/

# Security scan reports
gosec-report.sarif

# OS-specific files
.DS_Store
Expand Down
6 changes: 6 additions & 0 deletions .ignorecoverunit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Coverage exclusion patterns for unit tests
# Lines starting with # are comments
# Use * as wildcard for path matching

# Auto-generated mocks
*_mock.go
57 changes: 57 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,60 @@
## [2.5.0-beta.10](https://github.com/LerianStudio/lib-auth/compare/v2.5.0-beta.9...v2.5.0-beta.10) (2026-03-21)

## [2.5.0-beta.9](https://github.com/LerianStudio/lib-auth/compare/v2.5.0-beta.8...v2.5.0-beta.9) (2026-03-20)


### Bug Fixes

* **auth/middleware:** handle numeric code field in auth error response ([165db5f](https://github.com/LerianStudio/lib-auth/commit/165db5fdd324bb56304edd96b7e4d4579e351ade))

## [2.5.0-beta.8](https://github.com/LerianStudio/lib-auth/compare/v2.5.0-beta.7...v2.5.0-beta.8) (2026-03-17)


### Bug Fixes

* **auth/middleware:** return 401 instead of 500 for malformed tokens ([4f51877](https://github.com/LerianStudio/lib-auth/commit/4f51877ef95b4db01304cb9df5ba3a38919e55ff))

## [2.5.0-beta.7](https://github.com/LerianStudio/lib-auth/compare/v2.5.0-beta.6...v2.5.0-beta.7) (2026-03-10)


### Features

* **middleware:** migrate to lib-commons v4 API ([2e12d9b](https://github.com/LerianStudio/lib-auth/commit/2e12d9b1598eaafb27b1b427d8006a24eeea18ca))


### Bug Fixes

* **auth/middleware:** prevent panic on logger initialization failure ([6ba51e5](https://github.com/LerianStudio/lib-auth/commit/6ba51e5df9cbbdf62fc906c1837d6de41641946a))

## [2.5.0-beta.6](https://github.com/LerianStudio/lib-auth/compare/v2.5.0-beta.5...v2.5.0-beta.6) (2026-02-27)


### Features

* make gRPC interceptor tenant-aware with streaming support ([f4dae96](https://github.com/LerianStudio/lib-auth/commit/f4dae96c438554ca65c8fff5336c45410cb9d67d))


### Bug Fixes

* replace deprecated commons API calls ([805aadb](https://github.com/LerianStudio/lib-auth/commit/805aadb8ff2f1a6a8547733eeaf2618220511ee7))

## [2.5.0-beta.5](https://github.com/LerianStudio/lib-auth/compare/v2.5.0-beta.4...v2.5.0-beta.5) (2026-02-20)

## [2.5.0-beta.4](https://github.com/LerianStudio/lib-auth/compare/v2.5.0-beta.3...v2.5.0-beta.4) (2026-02-20)

## [2.5.0-beta.3](https://github.com/LerianStudio/lib-auth/compare/v2.5.0-beta.2...v2.5.0-beta.3) (2026-02-20)

## [2.5.0-beta.2](https://github.com/LerianStudio/lib-auth/compare/v2.5.0-beta.1...v2.5.0-beta.2) (2026-02-20)

## [2.5.0-beta.1](https://github.com/LerianStudio/lib-auth/compare/v2.4.1-beta.1...v2.5.0-beta.1) (2026-02-09)


### Bug Fixes

* **tests:** use safe find -exec instead of xargs pipeline :bug: ([da45b1a](https://github.com/LerianStudio/lib-auth/commit/da45b1ad9464aaf7925d932cd5af6b50a58562ea))

## [2.4.1-beta.1](https://github.com/LerianStudio/lib-auth/compare/v2.4.0...v2.4.1-beta.1) (2026-02-03)

## [2.4.0](https://github.com/LerianStudio/lib-auth/compare/v2.3.0...v2.4.0) (2026-01-27)


Expand Down
93 changes: 93 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Elastic License 2.0

URL: https://www.elastic.co/licensing/elastic-license

## Acceptance

By using the software, you agree to all of the terms and conditions below.

## Copyright License

The licensor grants you a non-exclusive, royalty-free, worldwide,
non-sublicensable, non-transferable license to use, copy, distribute, make
available, and prepare derivative works of the software, in each case subject to
the limitations and conditions below.

## Limitations

You may not provide the software to third parties as a hosted or managed
service, where the service provides users with access to any substantial set of
the features or functionality of the software.

You may not move, change, disable, or circumvent the license key functionality
in the software, and you may not remove or obscure any functionality in the
software that is protected by the license key.

You may not alter, remove, or obscure any licensing, copyright, or other notices
of the licensor in the software. Any use of the licensor's trademarks is subject
to applicable law.

## Patents

The licensor grants you a license, under any patent claims the licensor can
license, or becomes able to license, to make, have made, use, sell, offer for
sale, import and have imported the software, in each case subject to the
limitations and conditions in this license. This license does not cover any
patent claims that you cause to be infringed by modifications or additions to
the software. If you or your company make any written claim that the software
infringes or contributes to infringement of any patent, your patent license for
the software granted under these terms ends immediately. If your company makes
such a claim, your patent license ends immediately for work on behalf of your
company.

## Notices

You must ensure that anyone who gets a copy of any part of the software from you
also gets a copy of these terms.

If you modify the software, you must include in any modified copies of the
software prominent notices stating that you have modified the software.

## No Other Rights

These terms do not imply any licenses other than those expressly granted in
these terms.

## Termination

If you use the software in violation of these terms, such use is not licensed,
and your licenses will automatically terminate. If the licensor provides you
with a notice of your violation, and you cease all violation of this license no
later than 30 days after you receive that notice, your licenses will be
reinstated retroactively. However, if you violate these terms after such
reinstatement, any additional violation of these terms will cause your licenses
to terminate automatically and permanently.

## No Liability

*As far as the law allows, the software comes as is, without any warranty or
condition, and the licensor will not be liable to you for any damages arising
out of these terms or the use or nature of the software, under any kind of
legal claim.*

## Definitions

The **licensor** is the entity offering these terms, and the **software** is the
software the licensor makes available under these terms, including any portion
of it.

**you** refers to the individual or entity agreeing to these terms.

**your company** is any legal entity, sole proprietorship, or other kind of
organization that you work for, plus all organizations that have control over,
are under the control of, or are under common control with that
organization. **control** means ownership of substantially all the assets of an
entity, or the power to direct its management and policies by vote, contract, or
otherwise. Control can be direct or indirect.

**your licenses** are all the licenses granted to you for the software under
these terms.

**use** means anything you do with the software requiring one of your licenses.

**trademark** means trademarks, service marks, and similar rights.
Comment on lines +1 to +93
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Read-only consistency check for license references across repo artifacts.
fd -HI 'LICENSE*|README*|NOTICE*|COPYING*|go.mod|package.json|pyproject.toml|setup.py|pom.xml|Cargo.toml' .
rg -n -C2 'SPDX|license|Elastic|Apache|MIT|BSD|GPL|MPL' .

Repository: LerianStudio/lib-auth

Length of output: 3615


🏁 Script executed:

# Check README.md for license section
head -100 ./README.md | tail -50

# Check go.mod for license declaration
cat ./go.mod

# Search for any SPDX headers or old license references in code
rg -l 'SPDX-License-Identifier|Apache|MIT|BSD' --type-list | head -20
fd -e go -e ts -e js -e py | head -20 | xargs -I {} head -5 {}

Repository: LerianStudio/lib-auth

Length of output: 5048


🏁 Script executed:

# Check if README.md mentions license/Elastic
rg -i 'license|elastic' ./README.md -A 2 -B 2

# Search for SPDX headers in source files
rg 'SPDX-License-Identifier' 

# List all files in repo to check for conflicting licenses
find . -maxdepth 2 -type f \( -name "LICENSE*" -o -name "COPYING*" -o -name "NOTICE*" \)

# Check if any go.mod file has license field
rg 'license' ./go.mod

Repository: LerianStudio/lib-auth

Length of output: 74


Update README and source files to document Elastic License 2.0 adoption.

The Elastic License 2.0 file was added, but the license change is not documented elsewhere. README.md contains no license statement, source files have no SPDX headers, and go.mod includes no license metadata. This creates a compliance gap where downstream users and integrators remain unaware of the licensing restrictions (notably the hosted/managed service limitation). Add an explicit license section to README.md, include SPDX-License-Identifier headers in source files, and consider adding license metadata to go.mod for visibility.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@LICENSE` around lines 1 - 93, The repo added Elastic License 2.0 (LICENSE)
but lacked propagation; update README.md to add an explicit "License" section
that names "Elastic License 2.0" and briefly calls out the
hosted/managed-service restriction, add SPDX-License-Identifier: Elastic-2.0
headers to all source files (e.g., top of .go/.ts/.js files) and ensure go.mod
contains license metadata (module/comments or a license directive) so tooling
sees Elastic-2.0; search for README.md, go.mod and all source files to apply
these changes consistently and commit them alongside the LICENSE file.

Loading
Loading