forked from Peter-Slump/python-keycloak-client
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Peter-Slump#39 from Sispheor/features/custom_headers
[Feature] add custom headers. Closes Peter-Slump#38
- Loading branch information
Showing
4 changed files
with
83 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,6 +92,14 @@ Main methods:: | |
client_secret_key="secret", | ||
verify=True) | ||
|
||
# Optionally, you can pass custom headers that will be added to all HTTP calls | ||
# keycloak_openid = KeycloakOpenID(server_url="http://localhost:8080/auth/", | ||
# client_id="example_client", | ||
# realm_name="example_realm", | ||
# client_secret_key="secret", | ||
# verify=True, | ||
# custom_headers={'CustomHeader': 'value'}) | ||
|
||
# Get WellKnow | ||
config_well_know = keycloak_openid.well_know() | ||
|
||
|
@@ -143,6 +151,14 @@ Main methods:: | |
realm_name="example_realm", | ||
verify=True) | ||
|
||
# Optionally, you can pass custom headers that will be added to all HTTP calls | ||
#keycloak_admin = KeycloakAdmin(server_url="http://localhost:8080/auth/", | ||
# username='example-admin', | ||
# password='secret', | ||
# realm_name="example_realm", | ||
# verify=True, | ||
# custom_headers={'CustomHeader': 'value'}) | ||
|
||
# Add user | ||
new_user = keycloak_admin.create_user({"email": "[email protected]", | ||
"username": "[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters