Sha256: dc76e8f37a072b84630b6551646f898c2557d6969caf2ac12fad807572864bd8

Contents?: true

Size: 265 Bytes

Versions: 9

Compression:

Stored size: 265 Bytes

Contents

module OAuth
  class Unauthorized < OAuth::Error
    attr_reader :request
    def initialize(request = nil)
      @request = request
    end

    def to_s
      return "401 Unauthorized" if request.nil?

      "#{request.code} #{request.message}"
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
oauth-0.5.14 lib/oauth/errors/unauthorized.rb
oauth-0.5.13 lib/oauth/errors/unauthorized.rb
oauth-0.5.12 lib/oauth/errors/unauthorized.rb
oauth-0.5.11 lib/oauth/errors/unauthorized.rb
oauth-0.5.10 lib/oauth/errors/unauthorized.rb
oauth-0.5.9 lib/oauth/errors/unauthorized.rb
oauth-0.5.8 lib/oauth/errors/unauthorized.rb
oauth-0.5.7 lib/oauth/errors/unauthorized.rb
oauth-0.5.7.pre.pre1 lib/oauth/errors/unauthorized.rb