GitHub user adrianhaj added a comment to the discussion: How to use two jwt
headers one for normal flow "Authorization" and second for service to service
"X-Service-Authorization"
@dosu this method is not working:
```
def is_user_authenticated(self):
# Check for the standard Authorization header
if super().is_user_authenticated():
return True
# Check for the custom service token
service_token = request.environ.get('SERVICE_AUTH_TOKEN')
if service_token:
# Validate the service token (e.g., using Kubernetes TokenReview
API)
if self.validate_service_token(service_token):
# Assign the admin role to the user
self.assign_admin_role()
return True
return False
```
GitHub link:
https://github.com/apache/superset/discussions/33131#discussioncomment-12840985
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]