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

Added endpoint & randomUUID system #88

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

bloodtick
Copy link
Contributor

User can use a JSON map defined to insert additional headers. Hack is backwards compatible as it looks for a colon : that should not be used in base64 encoding required for the 'authorization' header. Example:
"x-api-key" : "{apikey}", "authorization" : "{apikey}", "Public-Key-Pins": "max-age=2592000; pin-sha256=\\"E9CZ9INDbd+2eRQozYqqbQ2yXLVKB9+xcprMF+44U1g=\\";"
Updated to allow a true JSON string and check for "{ }" instead of ":"
@idpaterson
Copy link
Collaborator

Thanks! I noticed that parent.state is not used elsewhere and found documentation from SmartThings suggesting that it may not always be safe to access directly. Would you please add a public method to the webCoRE smart app to return state.endpoint, similar to how isInstalled() works?

@bloodtick
Copy link
Contributor Author

Will look at it. Shouldn't be a problem to do that later today.

@bloodtick
Copy link
Contributor Author

All yours. State and Atomic are strange birds in ST land.

@idpaterson
Copy link
Collaborator

Is this finished? I wasn't able to trace where rtData.endpoint is meant to originate. I think you would need to provide that in getRunTimeData() for the webCoRE smart app.

@bloodtick
Copy link
Contributor Author

Yes, it is complete. It is a little tricky they way it is called and took some time to figure out, but it is filled here: private Map getVariable(rtData, name) when the piston calls for endpoint.

It doesn't load on the web interface and shows "null" from the .toString() method. This is expected behavior.

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