lib/rest_service/api.rb
# Add an authentication type to the API. Currently
# only `:http_basic`, `:http_digest` and `:oauth2` are supported.
Add an authentication type to the API.
Add an authentication type to the API .
def auth(type = nil, options = {}, &block)
        if type
          set(:auth, {:type => type.to_sym, :proc => block}.merge(options))
        else
          settings[:auth]
        end
      end
def auth ( type = nil , options = { } , & block ) if type set ( :auth , { :type => type . to_sym , :proc => block } . merge ( options ) ) else settings [ :auth ] end end
Add an authentication type to the API.
Add an authentication type to the API .
type
options
block