Sha256: 5b9074eed15f84f57842a9608227fcae5c2da12175780fb13f977150c93a50bc

Contents?: true

Size: 932 Bytes

Versions: 10

Compression:

Stored size: 932 Bytes

Contents

module SocialStream
  module Oauth2Server
    class Engine < Rails::Engine
      config.app_middleware.use Rack::OAuth2::Server::Resource::Bearer, 'Social Stream OAuth2' do |req|
        Oauth2Token::AccessToken.valid.find_by_token(req.access_token) || req.invalid_token!
      end

      initializer "social_stream-oauth2_server.ability" do
        SocialStream::Ability.module_eval do
          include SocialStream::Oauth2Server::Ability
        end
      end

      initializer "social_stream-oauth2_server.controller.helpers",
                  after: "social_stream-base.controller.helpers" do
        ActiveSupport.on_load(:action_controller) do
          include SocialStream::Oauth2Server::Controllers::Helpers
        end
      end

      initializer "social_stream-oauth2_server.add_filters" do |app|
        app.config.filter_parameters += [:secret]
        app.config.filter_parameters.uniq
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
social_stream-2.2.2 oauth2_server/lib/social_stream/oauth2_server/engine.rb
social_stream-oauth2_server-2.2.2 lib/social_stream/oauth2_server/engine.rb
social_stream-2.2.1 oauth2_server/lib/social_stream/oauth2_server/engine.rb
social_stream-oauth2_server-2.2.1 lib/social_stream/oauth2_server/engine.rb
social_stream-2.2.0 oauth2_server/lib/social_stream/oauth2_server/engine.rb
social_stream-oauth2_server-2.2.0 lib/social_stream/oauth2_server/engine.rb
social_stream-2.1.1 oauth2_server/lib/social_stream/oauth2_server/engine.rb
social_stream-oauth2_server-2.1.1 lib/social_stream/oauth2_server/engine.rb
social_stream-2.1.0 oauth2_server/lib/social_stream/oauth2_server/engine.rb
social_stream-oauth2_server-2.1.0 lib/social_stream/oauth2_server/engine.rb