Method: OAuth2::Provider::Rack::Responses.unauthorized
- Defined in:
- lib/oauth2/provider/rack/responses.rb
.unauthorized(error = nil) ⇒ Object
4 5 6 7 8 |
# File 'lib/oauth2/provider/rack/responses.rb', line 4 def self.(error = nil) challenge = "OAuth2" challenge << %{ error="#{error}"} if error [401, {'Content-Type' => 'text/plain', 'Content-Length' => '0', 'WWW-Authenticate' => challenge}, []] end |