Skip to content

Commit aa798df

Browse files
committed
Merge branch 'master' of github.com:evonove/django-oauth-toolkit
2 parents d00ed44 + 29fdeba commit aa798df

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

oauth2_provider/generators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def hash(self):
2626

2727
class ClientSecretGenerator(BaseHashGenerator):
2828
def hash(self):
29-
return oauthlib_generate_client_id(length=128, chars=CLIENT_ID_CHARACTER_SET)
29+
return oauthlib_generate_client_id(length=oauth2_settings.CLIENT_SECRET_GENERATOR_LENGTH, chars=CLIENT_ID_CHARACTER_SET)
3030

3131

3232
def generate_client_id():

oauth2_provider/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
DEFAULTS = {
3333
'CLIENT_ID_GENERATOR_CLASS': 'oauth2_provider.generators.ClientIdGenerator',
3434
'CLIENT_SECRET_GENERATOR_CLASS': 'oauth2_provider.generators.ClientSecretGenerator',
35+
'CLIENT_SECRET_GENERATOR_LENGTH': 128,
3536
'OAUTH2_VALIDATOR_CLASS': 'oauth2_provider.oauth2_validators.OAuth2Validator',
3637
'SCOPES': {"read": "Reading scope", "write": "Writing scope"},
3738
'READ_SCOPE': 'read',

0 commit comments

Comments
 (0)