equal
deleted
inserted
replaced
745 "authorization_code"; |
745 "authorization_code"; |
746 "password"; -- TODO Disable. The resource owner password credentials grant [RFC6749] MUST NOT be used. |
746 "password"; -- TODO Disable. The resource owner password credentials grant [RFC6749] MUST NOT be used. |
747 "refresh_token"; |
747 "refresh_token"; |
748 device_uri; |
748 device_uri; |
749 }) |
749 }) |
|
750 if allowed_grant_type_handlers:contains("device_code") then |
|
751 -- expand short form because that URI is long |
|
752 module:log("debug", "Expanding %q to %q in '%s'", "device_code", device_uri, "allowed_oauth2_grant_types"); |
|
753 allowed_grant_type_handlers:remove("device_code"); |
|
754 allowed_grant_type_handlers:add(device_uri); |
|
755 end |
750 for handler_type in pairs(grant_type_handlers) do |
756 for handler_type in pairs(grant_type_handlers) do |
751 if not allowed_grant_type_handlers:contains(handler_type) then |
757 if not allowed_grant_type_handlers:contains(handler_type) then |
752 module:log("debug", "Grant type %q disabled", handler_type); |
758 module:log("debug", "Grant type %q disabled", handler_type); |
753 grant_type_handlers[handler_type] = nil; |
759 grant_type_handlers[handler_type] = nil; |
754 else |
760 else |