summaryrefslogtreecommitdiff
path: root/keystone/token/token_formatters.py
diff options
context:
space:
mode:
Diffstat (limited to 'keystone/token/token_formatters.py')
-rw-r--r--keystone/token/token_formatters.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/keystone/token/token_formatters.py b/keystone/token/token_formatters.py
index bb407ab09..76220b0ef 100644
--- a/keystone/token/token_formatters.py
+++ b/keystone/token/token_formatters.py
@@ -156,10 +156,11 @@ class TokenFormatter(object):
# characters. Even though Keystone isn't storing a Fernet token
# anywhere, we can't say it isn't being stored somewhere else with
# those kind of backend constraints.
- if len(token) > 255:
- LOG.info('Fernet token created with length of %d '
- 'characters, which exceeds 255 characters',
- len(token))
+ if len(token) > CONF.max_token_size:
+ LOG.info(
+ f'Fernet token created with length of {len(token)} '
+ f'characters, which exceeds {CONF.max_token_size} characters',
+ )
return token