GrantTypeIdentifier and Client_id is now passed to getDefaultScope() and scopeExists().

Should deal with #294 and #312.

New PR that supersedes #304.