mirror of
https://github.com/openshift/community.okd.git
synced 2026-03-26 19:03:14 +00:00
Fix Failed Token Delete with PEP8 Indent (#242)
Co-authored-by: carter <me@halecarter.com>
This commit is contained in:
@@ -224,8 +224,10 @@ def get_oauthaccesstoken_objectname_from_token(token_name):
|
||||
"""
|
||||
|
||||
sha256Prefix = "sha256~"
|
||||
content = token_name.strip(sha256Prefix)
|
||||
|
||||
if token_name.startswith(sha256Prefix):
|
||||
content = token_name[len(sha256Prefix):]
|
||||
else:
|
||||
content = token_name
|
||||
b64encoded = urlsafe_b64encode(hashlib.sha256(content.encode()).digest()).rstrip(
|
||||
b"="
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user