rottweiler 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +2 -2
- data/README.md +4 -2
- data/lib/rottweiler/authentication.rb +2 -6
- data/lib/rottweiler/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3c168adefd023647e716ea26926b56a2638d891ff0aa1dd8688addd88a20a4ca
|
|
4
|
+
data.tar.gz: 2b2b56b75d112dc7eade9a30f70af065e1ca1cb97f7d91459c73b11f12cb20ca
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2735ce8274ce05879a251631052737cc601f7a528baf74d0716d27bcf5ee69fbcf89a47d53aad94d5aadee4352bf5e4732412873c569dcac61a13a88bdd3b773
|
|
7
|
+
data.tar.gz: 7ddfacb3026d5f91c98349f76bfb0fac012db5f759f0910cc76d35d3b671bbaf753bd5dd2e2146186754715b11ef33db44aa793af29bf46749ff56df44695607
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.2.0] - 2023-02-22
|
|
4
|
+
|
|
5
|
+
- [NEW] Changed the way response status is set on authentication failure, which now gives more controll over response status when using `on_authentication_failed` helper.
|
|
6
|
+
- [NEW] Better default response body on authentication failure.
|
|
7
|
+
|
|
3
8
|
## [0.1.0] - 2023-02-22
|
|
4
9
|
|
|
5
10
|
- Initial release
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rottweiler (0.
|
|
4
|
+
rottweiler (0.2.0)
|
|
5
5
|
jwt (>= 2.0)
|
|
6
6
|
rails (>= 5.0)
|
|
7
7
|
|
|
@@ -86,7 +86,7 @@ GEM
|
|
|
86
86
|
i18n (1.12.0)
|
|
87
87
|
concurrent-ruby (~> 1.0)
|
|
88
88
|
json (2.6.3)
|
|
89
|
-
jwt (2.
|
|
89
|
+
jwt (2.7.0)
|
|
90
90
|
loofah (2.19.1)
|
|
91
91
|
crass (~> 1.0.2)
|
|
92
92
|
nokogiri (>= 1.5.9)
|
data/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://codeclimate.com/github/demetra-it/rottweiler/maintainability)
|
|
4
4
|
[](https://codeclimate.com/github/demetra-it/rottweiler/test_coverage)
|
|
5
|
+
[](https://github.com/demetra-it/rottweiler/actions/workflows/ci-test.yml)
|
|
6
|
+
[](https://badge.fury.io/rb/rottweiler)
|
|
5
7
|
|
|
6
8
|
Rottweiler is a Ruby gem that provides functionality for verifying JSON Web Tokens (JWTs).
|
|
7
9
|
It allows you to easily verify the authenticity and integrity of JWTs, making it an essential tool for applications
|
|
@@ -150,7 +152,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
|
150
152
|
|
|
151
153
|
## Contributing
|
|
152
154
|
|
|
153
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/demetra-it/rottweiler. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/
|
|
155
|
+
Bug reports and pull requests are welcome on GitHub at [https://github.com/demetra-it/rottweiler](https://github.com/demetra-it/rottweiler). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/demetra-it/rottweiler/blob/master/CODE_OF_CONDUCT.md).
|
|
154
156
|
|
|
155
157
|
## License
|
|
156
158
|
|
|
@@ -158,4 +160,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
|
158
160
|
|
|
159
161
|
## Code of Conduct
|
|
160
162
|
|
|
161
|
-
Everyone interacting in the Rottweiler project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
|
163
|
+
Everyone interacting in the Rottweiler project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/demetra-it/rottweiler/blob/master/CODE_OF_CONDUCT.md).
|
|
@@ -16,8 +16,8 @@ module Rottweiler
|
|
|
16
16
|
if authentication.valid?
|
|
17
17
|
rottweiler_on_authentication_success!(authentication.data)
|
|
18
18
|
else
|
|
19
|
+
response.status = Rottweiler.config.unauthorized_status
|
|
19
20
|
rottweiler_on_authentication_failed!(authentication.errors)
|
|
20
|
-
force_rottweiler_auth_failure_status!
|
|
21
21
|
end
|
|
22
22
|
end
|
|
23
23
|
end
|
|
@@ -65,12 +65,8 @@ module Rottweiler
|
|
|
65
65
|
elsif rottweiler.auth_failed_cbk
|
|
66
66
|
send(rottweiler.auth_failed_cbk, errors)
|
|
67
67
|
else
|
|
68
|
-
render json: { errors: errors }
|
|
68
|
+
render json: { status: response.status, path: request.path, errors: errors }
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
|
-
|
|
72
|
-
def force_rottweiler_auth_failure_status!
|
|
73
|
-
response.status = Rottweiler.config.unauthorized_status
|
|
74
|
-
end
|
|
75
71
|
end
|
|
76
72
|
end
|
data/lib/rottweiler/version.rb
CHANGED