- if self.piston_auth.is_valid_request(request):
- consumer, token, parameters = self.piston_auth.validate_token(request)
- if consumer and token:
- return token.user, token
+ v, r = self.provider.validate_protected_resource_request(
+ **oauthlib_request(request)
+ )
+ if v:
+ return r.token.user, r.token