Files
openhab-core/itests/org.openhab.core.auth.oauth2client.tests
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Holger Friedrich
251e605071 Bump bnd.version from 7.2.3 to 7.3.0 (#5629)
* Bump bnd.version from 7.2.3 to 7.3.0

Bumps `bnd.version` from 7.2.3 to 7.3.0.

Updates `biz.aQute.bnd:bnd-maven-plugin` from 7.2.3 to 7.3.0
- [Release notes](https://github.com/bndtools/bnd/releases)
- [Commits](https://github.com/bndtools/bnd/compare/7.2.3...7.3.0)

Updates `biz.aQute.bnd:bnd-indexer-maven-plugin` from 7.2.3 to 7.3.0
- [Release notes](https://github.com/bndtools/bnd/releases)
- [Commits](https://github.com/bndtools/bnd/compare/7.2.3...7.3.0)

Updates `biz.aQute.bnd:bnd-resolver-maven-plugin` from 7.2.3 to 7.3.0
- [Release notes](https://github.com/bndtools/bnd/releases)
- [Commits](https://github.com/bndtools/bnd/compare/7.2.3...7.3.0)

Updates `biz.aQute.bnd:bnd-export-maven-plugin` from 7.2.3 to 7.3.0
- [Release notes](https://github.com/bndtools/bnd/releases)
- [Commits](https://github.com/bndtools/bnd/compare/7.2.3...7.3.0)

Updates `biz.aQute.bnd:bnd-testing-maven-plugin` from 7.2.3 to 7.3.0
- [Release notes](https://github.com/bndtools/bnd/releases)
- [Commits](https://github.com/bndtools/bnd/compare/7.2.3...7.3.0)

Updates `biz.aQute.bnd:bnd-baseline-maven-plugin` from 7.2.3 to 7.3.0
- [Release notes](https://github.com/bndtools/bnd/releases)
- [Commits](https://github.com/bndtools/bnd/compare/7.2.3...7.3.0)

Updates `biz.aQute.bnd:biz.aQute.tester.junit-platform` from 7.2.3 to 7.3.0
- [Release notes](https://github.com/bndtools/bnd/releases)
- [Commits](https://github.com/bndtools/bnd/compare/7.2.3...7.3.0)

---
updated-dependencies:
- dependency-name: biz.aQute.bnd:biz.aQute.tester.junit-platform
  dependency-version: 7.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: biz.aQute.bnd:bnd-baseline-maven-plugin
  dependency-version: 7.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
- dependency-name: biz.aQute.bnd:bnd-export-maven-plugin
  dependency-version: 7.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
- dependency-name: biz.aQute.bnd:bnd-indexer-maven-plugin
  dependency-version: 7.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: biz.aQute.bnd:bnd-maven-plugin
  dependency-version: 7.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: biz.aQute.bnd:bnd-resolver-maven-plugin
  dependency-version: 7.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: biz.aQute.bnd:bnd-testing-maven-plugin
  dependency-version: 7.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* adapt bndrun files

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Holger Friedrich <mail@holger-friedrich.de>
2026-06-06 21:20:22 +02:00
..
2024-12-24 07:02:47 +01:00
2019-02-15 10:46:18 +01:00
2025-12-22 22:01:01 +01:00
2020-08-11 20:38:24 +02:00

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>