mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-23 14:27:21 +00:00
14 lines
300 B
Ruby
14 lines
300 B
Ruby
class AuthTestsController < ApplicationController
|
|
wrap_parameters Blog
|
|
respond_to :json
|
|
|
|
# POST /auth-tests/basic
|
|
def basic
|
|
if authenticate_with_http_basic { |u, p| u == 'jsmith' && p == 'jspass' }
|
|
head :no_content
|
|
else
|
|
request_http_basic_authentication
|
|
end
|
|
end
|
|
end
|