yes-core 2.4.5 → 2.5.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 +3 -0
- data/lib/yes/core/configuration.rb +9 -0
- data/lib/yes/core/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: 657f96d2dc9f3d762a91b42976783cfead117aae5be6473e547b4e1568cc8e83
|
|
4
|
+
data.tar.gz: 0c5b51b64f133b09cf14ef1d9c99fc7fcdd94f67f479f410dca443545b13ce56
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cecd619ffb8384612a3ad7a1640fbe6ed9f8d8b73b01f0da6bc8d1892bce474af92274444d8a3c7b16e1bfc622a1cadccbc793f51d61196dd48a57abbd3e0ec5
|
|
7
|
+
data.tar.gz: a8f5aee284c9e77715b839b395e4aefa99375275d76d47f9003e9aaf510cd77db88c5fc39c37046523247a01e958c8e1e689da8afc0044bb0928692bd311147c
|
data/CHANGELOG.md
CHANGED
|
@@ -104,6 +104,15 @@ module Yes
|
|
|
104
104
|
# #verify_token(token) and #error_classes (returns array of error classes).
|
|
105
105
|
attr_accessor :auth_adapter
|
|
106
106
|
|
|
107
|
+
# Error classes an API controller should rescue as authentication failures: the gem's own
|
|
108
|
+
# AuthenticationError plus the classes of the configured auth adapter (if any). Computed on
|
|
109
|
+
# each call because the adapter is assigned in an initializer after controllers may load.
|
|
110
|
+
#
|
|
111
|
+
# @return [Array<Class>] deduplicated error classes
|
|
112
|
+
def auth_error_classes
|
|
113
|
+
[Yes::Core::AuthenticationError, *auth_adapter&.error_classes].uniq
|
|
114
|
+
end
|
|
115
|
+
|
|
107
116
|
# Initializes a new configuration instance with nested hashes for class storage.
|
|
108
117
|
def initialize
|
|
109
118
|
@registered_classes = Hash.new do |h, k|
|
data/lib/yes/core/version.rb
CHANGED