oauthlib
oauthlib copied to clipboard
Fix client authentication for DeviceCodeGrant when getting a token
Adds a helper method for validating client authentication and use it in AuthorizationCodeGrant, DeviceCodeGrant, RefreshTokenGrant, and ResourceOwnerPasswordCredentialsGrant.
Putting the helper method in DeviceCodeGrant also fixes an issue where the client being public/confidential was not being taken into consideration.
Add some missing imports to the oauth2 init.py that I noticed weren't there when implementing changes in my own code.
Resolves https://github.com/oauthlib/oauthlib/issues/919