Skip to content

Added endpoint & randomUUID system#88

Open
bloodtick wants to merge 7 commits intoady624:devfrom
bloodtick:master
Open

Added endpoint & randomUUID system#88
bloodtick wants to merge 7 commits intoady624:devfrom
bloodtick:master

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