Sha256: 19cf2fc1875e9867b5c8e7659bcbd36ac8925144af75730605672b6ff5697c0f

Contents?: true

Size: 1.14 KB

Versions: 30

Compression:

Stored size: 1.14 KB

Contents

# frozen_string_literal: true

module Doorkeeper
  module Errors
    class DoorkeeperError < StandardError
      def type
        message
      end
    end

    class InvalidGrantReuse < DoorkeeperError
      def type
        :invalid_grant
      end
    end

    class InvalidTokenStrategy < DoorkeeperError
      def type
        :unsupported_grant_type
      end
    end

    class MissingRequiredParameter < DoorkeeperError
      attr_reader :missing_param

      def initialize(missing_param)
        super
        @missing_param = missing_param
      end

      def type
        :invalid_request
      end
    end

    class BaseResponseError < DoorkeeperError
      attr_reader :response

      def initialize(response)
        @response = response
      end
    end

    UnableToGenerateToken = Class.new(DoorkeeperError)
    TokenGeneratorNotFound = Class.new(DoorkeeperError)
    NoOrmCleaner = Class.new(DoorkeeperError)

    InvalidToken = Class.new(BaseResponseError)
    TokenExpired = Class.new(InvalidToken)
    TokenRevoked = Class.new(InvalidToken)
    TokenUnknown = Class.new(InvalidToken)
    TokenForbidden = Class.new(InvalidToken)
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
doorkeeper-5.6.6 lib/doorkeeper/errors.rb
doorkeeper-5.6.4 lib/doorkeeper/errors.rb
doorkeeper-5.6.3 lib/doorkeeper/errors.rb
doorkeeper-5.6.2 lib/doorkeeper/errors.rb
doorkeeper-5.6.1 lib/doorkeeper/errors.rb
doorkeeper-5.6.0 lib/doorkeeper/errors.rb
doorkeeper-5.6.0.rc2 lib/doorkeeper/errors.rb
doorkeeper-5.6.0.rc1 lib/doorkeeper/errors.rb
doorkeeper-5.5.4 lib/doorkeeper/errors.rb
doorkeeper-5.5.3 lib/doorkeeper/errors.rb
doorkeeper-5.5.2 lib/doorkeeper/errors.rb
doorkeeper-5.5.1 lib/doorkeeper/errors.rb
doorkeeper-5.5.0 lib/doorkeeper/errors.rb
doorkeeper-5.5.0.rc2 lib/doorkeeper/errors.rb
doorkeeper-5.5.0.rc1 lib/doorkeeper/errors.rb
doorkeeper-5.4.0 lib/doorkeeper/errors.rb
doorkeeper-5.2.6 lib/doorkeeper/errors.rb
doorkeeper-5.3.3 lib/doorkeeper/errors.rb
doorkeeper-5.4.0.rc2 lib/doorkeeper/errors.rb
doorkeeper-5.2.5 lib/doorkeeper/errors.rb