Sha256: 3dc8cac70daf0a00e802bc69648c18be750783f485803c04c4a603fea12d40e1
Contents?: true
Size: 565 Bytes
Versions: 1
Compression:
Stored size: 565 Bytes
Contents
module WineBouncer module AuthStrategies class Default < ::WineBouncer::BaseStrategy def endpoint_protected? !!endpoint_authorizations end def has_auth_scopes? !!endpoint_authorizations && endpoint_authorizations.key?(:scopes) && !endpoint_authorizations[:scopes].empty? end def auth_scopes endpoint_authorizations[:scopes].map(&:to_sym) end private def endpoint_authorizations api_context.options[:route_options][:auth] end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wine_bouncer-0.5.1 | lib/wine_bouncer/auth_strategies/default.rb |