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

chore: example to create secure fiware header #319

Merged
merged 3 commits into from
Oct 22, 2024

Conversation

sbanoeon
Copy link
Contributor

No description provided.

@sbanoeon sbanoeon requested a review from djs0109 August 27, 2024 14:47
SERVICE_PATH = '/'
CLIENT_ID = 'client_id'
CLIENT_SECRET = 'client_secret'
KEYCLOAK_HOST = 'https://keycloak.example.com'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sbanoeon could you generally add some hints for example here, TODO: adapt it to your authentication endpoint

@@ -0,0 +1,111 @@
import os
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sbanoeon, could you add a short description of what this example is about at the beginning? Just make sure the style aligns with the other examples we already have

authorization='Bearer %s' % token)

# create a context broker client
cb_client = ContextBrokerClient(url=CB_URL, fiware_header=fiware_header, session=session)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sbanoeon could you add some get/put requests here to show that the request does not need to be adapted. By the way, the token must be consistently queried, right? If so, please also add a hints regarding this

@djs0109
Copy link
Contributor

djs0109 commented Sep 24, 2024

The rest looks good to me!

Copy link
Contributor

@djs0109 djs0109 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will still update the changelog

@djs0109 djs0109 merged commit aefa83e into master Oct 22, 2024
1 check was pending
@djs0109 djs0109 deleted the 316-Function-to-fetch-and-refresh-tokens branch October 22, 2024 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants