Skip to content
This repository has been archived by the owner on Feb 14, 2018. It is now read-only.

Commit

Permalink
rfc6750 compability
Browse files Browse the repository at this point in the history
  • Loading branch information
Mazon committed Nov 26, 2015
1 parent e18c39a commit 5b279cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nginx-jwt.lua
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ function M.auth(claim_specs)
ngx.log(ngx.WARN, "User did not satisfy claim: ".. blocking_claim)

-- https://tools.ietf.org/html/rfc6750#section-3.1
if claim == "scope" then
ngx.header["WWW-Authenticate"] = 'Bearer error="insufficient_scope",' .. claim .. '=' .. spec
if blocking_claim == "scope" then
ngx.header["WWW-Authenticate"] = 'Bearer error="insufficient_scope",' .. blocking_claim .. '=' .. blocking_spec
ngx.exit(ngx.HTTP_FORBIDDEN)
end
ngx.exit(ngx.HTTP_UNAUTHORIZED)
Expand Down

0 comments on commit 5b279cc

Please sign in to comment.