Skip to content

Commit

Permalink
Merge pull request #687 from Mashape/chore/oauth2
Browse files Browse the repository at this point in the history
Better URL handling for OAuth 2.0
  • Loading branch information
subnetmarco committed Nov 5, 2015
2 parents 7f97216 + c345918 commit 787c517
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kong/plugins/oauth2/access.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ local GRANT_PASSWORD = "password"
local ERROR = "error"
local AUTHENTICATED_USERID = "authenticated_userid"

local AUTHORIZE_URL = "^%s/oauth2/authorize/?$"
local TOKEN_URL = "^%s/oauth2/token/?$"

local AUTHORIZE_URL = "^%s/oauth2/authorize(/?(\\?[^\\s]*)?)$"
local TOKEN_URL = "^%s/oauth2/token(/?(\\?[^\\s]*)?)$"

-- TODO: Expire token (using TTL ?)
local function generate_token(conf, credential, authenticated_userid, scope, state, expiration, disable_refresh)
Expand Down

0 comments on commit 787c517

Please sign in to comment.