Sha256: 22df678bd108c660dcdab6b257e7db0675227f4f87c5320e731b582423088a3f

Contents?: true

Size: 879 Bytes

Versions: 13

Compression:

Stored size: 879 Bytes

Contents

module OAuth2
  module Strategy
    # The Implicit Strategy
    #
    # @see http://tools.ietf.org/html/draft-ietf-oauth-v2-26#section-4.2
    class Implicit < Base
      # The required query parameters for the authorize URL
      #
      # @param [Hash] params additional query parameters
      def authorize_params(params = {})
        params.merge('response_type' => 'token', 'client_id' => @client.id)
      end

      # The authorization URL endpoint of the provider
      #
      # @param [Hash] params additional query parameters for the URL
      def authorize_url(params = {})
        @client.authorize_url(authorize_params.merge(params))
      end

      # Not used for this strategy
      #
      # @raise [NotImplementedError]
      def get_token(*)
        raise(NotImplementedError, 'The token is accessed differently in this strategy')
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
oauth2-1.4.8 lib/oauth2/strategy/implicit.rb
oauth2-1.4.7 lib/oauth2/strategy/implicit.rb
oauth2-1.4.6 lib/oauth2/strategy/implicit.rb
oauth2-1.4.5 lib/oauth2/strategy/implicit.rb
oauth2-1.4.4 lib/oauth2/strategy/implicit.rb
oauth2-1.4.3 lib/oauth2/strategy/implicit.rb
oauth2-1.4.2 lib/oauth2/strategy/implicit.rb
oauth2-1.4.1 lib/oauth2/strategy/implicit.rb
oauth2-1.4.0 lib/oauth2/strategy/implicit.rb
oauth2-1.3.1 lib/oauth2/strategy/implicit.rb
oauth2-1.3.0 lib/oauth2/strategy/implicit.rb
second_step-0.1.2 secondstep-notify-1.0.0-osx/lib/ruby/lib/ruby/gems/2.2.0/gems/oauth2-1.2.0/lib/oauth2/strategy/implicit.rb
oauth2-1.2.0 lib/oauth2/strategy/implicit.rb