class OauthBwergemn::AuthStrategies::Hub

Public Instance Methods

auth_scopes() click to toggle source
# File lib/oauth_bwergemn/auth_strategies/hub.rb, line 16
def auth_scopes
  endpoint_authorizations[:scopes].map { |s| s.is_a?(String) || s.is_a?(Symbol) ? s.to_sym : s }
end
endpoint_protected?() click to toggle source
# File lib/oauth_bwergemn/auth_strategies/hub.rb, line 6
def endpoint_protected?
  !!endpoint_authorizations
end
has_auth_scopes?() click to toggle source
# File lib/oauth_bwergemn/auth_strategies/hub.rb, line 10
def has_auth_scopes?
  !!endpoint_authorizations &&
    endpoint_authorizations.key?(:scopes) &&
    !endpoint_authorizations[:scopes].empty?
end

Private Instance Methods

endpoint_authorizations() click to toggle source
# File lib/oauth_bwergemn/auth_strategies/hub.rb, line 22
def endpoint_authorizations
  api_context.options[:route_options][:auth]
end