Method: ActionController::HttpAuthentication::Digest#authentication_header
- Defined in:
- actionpack/lib/action_controller/metal/http_authentication.rb
#authentication_header(controller, realm) ⇒ Object
274 275 276 277 278 279 |
# File 'actionpack/lib/action_controller/metal/http_authentication.rb', line 274 def authentication_header(controller, realm) secret_key = secret_token(controller.request) nonce = self.nonce(secret_key) opaque = opaque(secret_key) controller.headers["WWW-Authenticate"] = %(Digest realm="#{realm}", qop="auth", algorithm=MD5, nonce="#{nonce}", opaque="#{opaque}") end |