get verify option from session secure option
Change-Id: If1bed7f76d6c77c0bb08f5831e67291362bb2704
This commit is contained in:
parent
4906f4c749
commit
989a0419cc
@ -95,8 +95,10 @@ class VitrageKeycloakPlugin(plugin.BaseAuthPlugin):
|
|||||||
self.endpoint = endpoint
|
self.endpoint = endpoint
|
||||||
self.auth_url = auth_url
|
self.auth_url = auth_url
|
||||||
self.client_id = openid_client_id
|
self.client_id = openid_client_id
|
||||||
|
self.verify = True
|
||||||
|
|
||||||
def get_headers(self, session, **kwargs):
|
def get_headers(self, session, **kwargs):
|
||||||
|
self.verify = session.verify
|
||||||
return {'X-Auth-Token': self._authenticate_keycloak(),
|
return {'X-Auth-Token': self._authenticate_keycloak(),
|
||||||
'x-user-id': self.username,
|
'x-user-id': self.username,
|
||||||
'x-project-id': self.realm_name}
|
'x-project-id': self.realm_name}
|
||||||
@ -118,7 +120,7 @@ class VitrageKeycloakPlugin(plugin.BaseAuthPlugin):
|
|||||||
|
|
||||||
resp = requests.post(keycloak_endpoint,
|
resp = requests.post(keycloak_endpoint,
|
||||||
data=body,
|
data=body,
|
||||||
verify=True)
|
verify=self.verify)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
resp.raise_for_status()
|
resp.raise_for_status()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user