Module: BasicAndNego::Auth::Responses

Included in:
Base
Defined in:
lib/basic_and_nego/auth/responses.rb

Instance Method Summary collapse

Instance Method Details

#bad_requestObject



18
19
20
21
22
23
24
# File 'lib/basic_and_nego/auth/responses.rb', line 18

def bad_request
  [ 400,
    { 'Content-Type' => 'text/plain',
      'Content-Length' => '0' },
      []
  ]
end

#challengeObject



5
6
7
# File 'lib/basic_and_nego/auth/responses.rb', line 5

def challenge
  ["Negotiate", "Basic"]
end

#errorObject



26
27
28
29
30
31
32
# File 'lib/basic_and_nego/auth/responses.rb', line 26

def error
  [ 500,
    { 'Content-Type' => 'text/plain',
      'Content-Length' => '0' },
      []
  ]
end

#unauthorizedObject



9
10
11
12
13
14
15
16
# File 'lib/basic_and_nego/auth/responses.rb', line 9

def unauthorized
  [ 401,
    { 'Content-Type' => 'text/plain',
      'Content-Length' => '0',
      'WWW-Authenticate' => challenge },
      []
  ]
end