class WineBouncer::AuthStrategies::Protected
Public Instance Methods
auth_scopes()
click to toggle source
# File lib/wine_bouncer/auth_strategies/protected.rb, line 16 def auth_scopes endpoint_authorizations[:scopes].map(&:to_sym) end
endpoint_protected?()
click to toggle source
# File lib/wine_bouncer/auth_strategies/protected.rb, line 6 def endpoint_protected? has_authorizations? end
has_auth_scopes?()
click to toggle source
# File lib/wine_bouncer/auth_strategies/protected.rb, line 10 def has_auth_scopes? endpoint_authorizations && endpoint_authorizations.key?(:scopes) && endpoint_authorizations[:scopes].any? end
Private Instance Methods
scope_keys?()
click to toggle source
if false or nil scopes are entered the authorization should be skipped. nil_authorizations? is used to check against the legacy hash.
# File lib/wine_bouncer/auth_strategies/protected.rb, line 34 def scope_keys? nil_authorizations? || endpoint_authorizations[:scopes] != [false] end