Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix auth mechanism 3/3 #780

Merged
merged 1 commit into from
Dec 14, 2023
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
6 changes: 3 additions & 3 deletions zvmsdk/sdkwsgi/handlers/tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def create(req):
return req.response
# Validation is open, so start to validate the admin-token
if 'X-Admin-Token' not in req.headers:
LOG.debug('no X-Admin-Token given in reqeust header')
LOG.debug('no X-Admin-Token given in request header')
raise exception.ZVMUnauthorized()
token_file_path = CONF.wsgi.token_path
admin_token = get_admin_token(token_file_path)
Expand Down Expand Up @@ -96,7 +96,7 @@ def wrap_func(req, *args, **kwargs):

# so, this is for token validation
if 'X-Auth-Token' not in req.headers:
LOG.debug('no X-Auth-Token given in reqeust header')
LOG.debug('no X-Auth-Token given in request header')
raise exception.ZVMUnauthorized()

token_file_path = CONF.wsgi.token_path
Expand All @@ -110,7 +110,7 @@ def wrap_func(req, *args, **kwargs):
LOG.debug('token not valid')
raise exception.ZVMUnauthorized()
except Exception:
LOG.debug('unknown exception occur during token validation')
LOG.debug('unknown exception occurred during token validation')
raise exception.ZVMUnauthorized()

return function(req, *args, **kwargs)
Expand Down
Loading