tests: add basic authz for oidc clients (#63157)
This commit is contained in:
parent
bf73d8d7b3
commit
241ceaaccd
|
@ -132,6 +132,12 @@ def basic_authorization_header(user_or_id, password=None):
|
|||
return {'Authorization': 'Basic %s' % str(force_str(b64_cred))}
|
||||
|
||||
|
||||
def basic_authorization_oidc_client(client):
|
||||
cred = f'{client.client_id}:{client.client_secret}'
|
||||
b64_cred = base64.b64encode(cred.encode('utf-8'))
|
||||
return {'Authorization': 'Basic %s' % str(force_str(b64_cred))}
|
||||
|
||||
|
||||
def get_response_form(response, form='form'):
|
||||
contexts = list(response.context)
|
||||
for c in contexts:
|
||||
|
|
Loading…
Reference in New Issue