mirror of
https://github.com/danieldemus/openhab-core.git
synced 2026-07-29 12:34:22 +02:00
* Upgrade swagger to 2.2.28 * Upgrade swagger from 2.2.15 to 2.2.28 For changelog, see https://github.com/swagger-api/swagger-core/releases * Upgrade javassist from 3.29.2-GA to 3.30.2-GA Signed-off-by: Holger Friedrich <mail@holger-friedrich.de> * Upgrade cxf to 3.6.5 * Upgrade cxf from 3.6.4 to 3.6.5 Find the list of relevant changes here: https://github.com/apache/cxf/blame/3.6.x-fixes/distribution/src/main/release/release_notes.txt Signed-off-by: Holger Friedrich <mail@holger-friedrich.de> * Upgrade junit to 5.11.4 * Upgrade junit from 5.10.0 to 5.11.4 * Upgrade junit-platform-* from 1.10.0 to 1.11.4 Release notes: https://junit.org/junit5/docs/5.11.4/release-notes/ Signed-off-by: Holger Friedrich <mail@holger-friedrich.de> * Upgrade californium to 4.0.0-M2 * Upgrade californium from 2.7.4 to 4.0.0-M2 * Replace special OH built net.i2p.crypto.eddsa by BouncyCastle * Upgrade slf4j from 2.0.12 to 2.0.16 Signed-off-by: Holger Friedrich <mail@holger-friedrich.de> * Upgrade hamcrest to 3.0 * Upgrade hamcrest from 2.2 to 3.0 Release notes: https://github.com/hamcrest/JavaHamcrest/releases/tag/v3.0 Signed-off-by: Holger Friedrich <mail@holger-friedrich.de> --------- Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This is a working bundle for demonstrating/ testing the OAuth2 client. Passwords, secrets, etc have to be configured through config admin in order for it to work
Simply deploy it to the runtime; then openhab:oauth commands will be registered and ready to test.
Example 1: (Using authorization code)
Try these on the OSGI console:
openhab:oauth Code cleanupEverything
openhab:oauth Code create
openhab:oauth Code getClient <fill in handle from create step>
openhab:oauth Code getAuthorizationUrl
now open browser with the URL from above step, authenticate yourself
to a real oauth provider
if everything works properly, it should redirect you to your redirectURL
Read the code http parameter from the redirectURL
openhab:oauth Code getAccessTokenByCode <code from redirectURL parameter>
openhab:oauth Code getCachedAccessToken
openhab:oauth Code refresh
openhab:oauth Code close
Example 2: (Using ResourceOwner credentials i.e. you have the user's username and password directly)
Try these on the OSGI console:
openhab:oauth ResourceOwner create
openhab:oauth ResourceOwner getClient <fill in handle from create step>
openhab:oauth ResourceOwner getAccessTokenByResourceOwnerPassword
openhab:oauth ResourceOwner getCachedAccessToken
openhab:oauth ResourceOwner refresh
openhab:oauth ResourceOwner close
load again, similar to reboot/restart
openhab:oauth ResourceOwner getClient <fill in handle from create step>
openhab:oauth ResourceOwner getCachedAccessToken
openhab:oauth ResourceOwner refresh
Done playing, delete this service permanently
openhab:oauth ResourceOwner delete <fill in handle from create step>
Verify this is deleted (will throw exception)
openhab:oauth ResourceOwner getCachedAccessToken
Cannot get the client after delete
openhab:oauth ResourceOwner getClient <fill in handle from create step>