Skip to content

refactor: reintroduce keycloak-admin to service #91

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

Merged
merged 2 commits into from
Jul 30, 2021
Merged

refactor: reintroduce keycloak-admin to service #91

merged 2 commits into from
Jul 30, 2021

Conversation

VincentDatrier
Copy link
Contributor

Hi there,

As per your suggestions, I reintroduced keycloak-admin within the code. This time, instead of using auth, I simply set the token fetched by openid-client by using the setAccessToken function from keycloak-admin. This should restore functionality for users that need keycloak-admin directly, all while having only one set of tokens.

As suggested, people may use the AdminClient directly.

Reading the keycloak-admin code shows that the auth function basically
does what openid-client does by fetching tokens; I used setAccessToken
instead to avoid double authenticating against Keycloak.
@anonrig
Copy link
Owner

anonrig commented Jul 30, 2021

Can you also add keycloak-admin as a dependency?

@anonrig anonrig merged commit 706b39c into anonrig:master Jul 30, 2021
github-actions bot pushed a commit that referenced this pull request Jul 30, 2021
# [1.6.0](v1.5.19...v1.6.0) (2021-07-30)

### Bug Fixes

* update dependencies ([dfc4dab](dfc4dab))

### Features

* reintroduce keycloak-admin to service ([#91](#91)) ([706b39c](706b39c))
@github-actions
Copy link

🎉 This PR is included in version 1.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions bot pushed a commit to FORSIT-Group/nestjs-keycloak-admin-restful that referenced this pull request Jun 9, 2022
# 1.0.0 (2022-06-09)

### Bug Fixes

* add missing types for express ([cbaf5d5](cbaf5d5))
* **build:** fix build system to support module and main packages ([5f6ba89](5f6ba89))
* changed @keycloak/keycloak-admin-client dependency to a branch containing fixes ([45bee3a](45bee3a))
* **config:** fix configuration and prepare for usage ([c15a523](c15a523))
* **constants:** remove unnecessary constant ([64ac801](64ac801))
* **dependencies:** bump and analyze dependencies ([477114d](477114d))
* **dependencies:** fix dependencies and convert to yarn ([6d55018](6d55018))
* extend refresh logic with reauth ([anonrig#11](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/11), [anonrig#76](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/76)) ([anonrig#90](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/90)) ([fc4b27d](fc4b27d))
* **guard:** fix resource guard ([efb4e7b](efb4e7b))
* **guard:** move getRequest to instance method for overriding ([4d18974](4d18974))
* handle an edge case where headers is null ([a478acd](a478acd))
* **module:** make module global ([ae69c97](ae69c97))
* **module:** make module global and export service ([5e550ac](5e550ac))
* **options:** remove jwt issuer parameter from config ([8b6e9c7](8b6e9c7))
* **options:** validate baseUrl to start with http ([79b5e79](79b5e79))
* package.json & .snyk to reduce vulnerabilities ([7ad33f4](7ad33f4))
* package.json & package-lock.json to reduce vulnerabilities ([anonrig#10](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/10)) ([8c42143](8c42143))
* package.json & package-lock.json to reduce vulnerabilities ([anonrig#92](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/92)) ([5c82f42](5c82f42))
* package.json & package-lock.json to reduce vulnerabilities ([anonrig#98](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/98)) ([a1fd72b](a1fd72b))
* **package:** change package type to module ([a278427](a278427))
* **package:** fix package export on main ([b535089](b535089))
* **package:** remove type module ([bbe8c9d](bbe8c9d))
* **release:** remove github release assets ([1ff4926](1ff4926))
* remove keycloak-admin reference ([e13fdac](e13fdac))
* **request-manager:** fix base url misusage and properly handle resolve ([dbedeaf](dbedeaf))
* **resource-enforcer:** fix request reference ([2117b38](2117b38))
* **resource-enforcer:** make request as any since ts compiler ignores it ([2099d92](2099d92))
* **service:** fix service initialization and bump version ([d163f28](d163f28))
* update dependencies ([dfc4dab](dfc4dab))
* update example project and bump dependencies ([8aa31d4](8aa31d4))
* update invalid urls on package.json ([7f14b08](7f14b08))
* upgrade @nestjs/core from 8.0.6 to 8.0.7 ([anonrig#102](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/102)) ([8f87e78](8f87e78))
* upgrade axios from 0.20.0 to 0.21.0 ([anonrig#12](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/12)) ([8ed0c83](8ed0c83))
* upgrade keycloak-admin from 1.14.10 to 1.14.15 ([anonrig#80](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/80)) ([c3e1dcf](c3e1dcf))
* upgrade keycloak-admin from 1.14.15 to 1.14.17 ([anonrig#84](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/84)) ([37986fc](37986fc))
* upgrade keycloak-admin from 1.14.17 to 1.14.18 ([anonrig#89](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/89)) ([6c4025c](6c4025c))
* upgrade keycloak-admin from 1.14.20 to 1.14.21 ([anonrig#93](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/93)) ([a14b17b](a14b17b))
* upgrade keycloak-admin from 1.14.21 to 1.14.22 ([anonrig#99](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/99)) ([0d34590](0d34590))
* upgrade keycloak-admin from 1.14.7 to 1.14.8 ([anonrig#54](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/54)) ([9a90012](9a90012))
* upgrade keycloak-admin from 1.14.8 to 1.14.9 ([anonrig#60](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/60)) ([c11a2f2](c11a2f2))
* upgrade keycloak-admin from 1.14.9 to 1.14.10 ([anonrig#66](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/66)) ([c7c1211](c7c1211))
* upgrade keycloak-connect from 12.0.2 to 12.0.3 ([anonrig#57](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/57)) ([ea5f9a3](ea5f9a3))
* upgrade keycloak-connect from 12.0.3 to 12.0.4 ([anonrig#59](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/59)) ([546470c](546470c))
* upgrade keycloak-connect from 15.0.0 to 15.0.1 ([anonrig#96](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/96)) ([3bd5500](3bd5500))
* upgrade multiple dependencies with Snyk ([anonrig#95](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/95)) ([1eef7d8](1eef7d8))
* upgrade openid-client from 4.3.0 to 4.4.0 ([anonrig#53](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/53)) ([c67b775](c67b775))
* upgrade openid-client from 4.4.0 to 4.4.1 ([anonrig#58](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/58)) ([43d736c](43d736c))
* upgrade openid-client from 4.4.1 to 4.5.1 ([anonrig#65](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/65)) ([210a159](210a159))
* upgrade openid-client from 4.5.1 to 4.6.0 ([anonrig#68](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/68)) ([14ca6f2](14ca6f2))
* upgrade openid-client from 4.5.1 to 4.6.0 ([anonrig#69](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/69)) ([ed59d7d](ed59d7d))
* upgrade openid-client from 4.6.0 to 4.7.1 ([anonrig#77](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/77)) ([4be6a32](4be6a32))
* upgrade openid-client from 4.7.1 to 4.7.3 ([anonrig#87](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/87)) ([3c9004b](3c9004b))
* upgrade openid-client from 4.7.3 to 4.7.4 ([anonrig#88](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/88)) ([5a14c91](5a14c91))
* upgrade openid-client from 4.7.5 to 4.8.0 ([anonrig#100](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/100)) ([fb04b12](fb04b12))
* upgrade openid-client from 4.8.0 to 4.9.0 ([anonrig#101](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/101)) ([fc6e412](fc6e412))
* **workflow:** switch to npm ([be5e662](be5e662))

### Features

* add example project and update readme ([bd7dedb](bd7dedb))
* added a keycloak admin client version with fixes policy handling ([cbb136c](cbb136c))
* **graphql:** add graphql support ([5a7022e](5a7022e))
* implement connect functionality and rewrite the project ([89f0265](89f0265))
* initialize repo ([f681243](f681243))
* reintroduce keycloak-admin to service ([anonrig#91](https://github.com/FORSIT-Group/nestjs-keycloak-admin-restful/issues/91)) ([706b39c](706b39c))
* **resource:** reimplement resource enforcer ([0744bb5](0744bb5))
* **uma:** Add support for User-Managed Access ([d6fe865](d6fe865))
* update and refactor dependencies ([6418100](6418100))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants