Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions flask_oauthlib/provider/oauth2.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import logging
import datetime
from functools import wraps
from flask import _app_ctx_stack
from flask import request, url_for
from flask import redirect, make_response, abort
from werkzeug import cached_property
Expand Down Expand Up @@ -432,11 +431,7 @@ def authenticate_client(self, request, *args, **kwargs):
log.debug('Authenticate client failed, secret not match.')
return False

confidential = 'confidential'
if hasattr(client, 'confidential'):
confidential = client.confidential

if client.client_type != confidential:
if client.client_type != 'confidential':
log.debug('Authenticate client failed, not confidential.')
return False
log.debug('Authenticate client success.')
Expand All @@ -459,11 +454,7 @@ def authenticate_client_id(self, client_id, request, *args, **kwargs):

# authenticate non-confidential client_type only
# most of the clients are of public client_type
confidential = 'confidential'
if hasattr(client, 'confidential'):
confidential = client.confidential

if client.client_type == confidential:
if client.client_type == 'confidential':
log.debug('Authenticate client failed, confidential client.')
return False
return True
Expand Down