Skip to content

Conversation

@pehala
Copy link

@pehala pehala commented Sep 9, 2019

Overview

  • Extracted basic CRUD logic from entities into common superclass KeycloakAdminEntity.
    • Entity parameters are available directly (e.g entity.id, entity.serviceAccountsEnabled).
    • Entity is fetched lazily when needed.
    • Update request shouldn't change unique identifiers, that will make the object not work anymore.
    • Update method doesn't transform snail_case into camelCase.
  • Added more methods to ClientRoles, Realms and Clients collections.
  • Added Token class which represents refreshable Token.
    • Token is now returned by most method in KeycloakOpenIDConnect class.
    • Token is automatically refreshed when set up as authentication header.
      • NOTE: I am not sure about validity of refreshing code for authentication by client_id and client_secret
  • Added Pipfile for easier setup
  • Edit test to reflect these changes.
  • Removed some called_only_once checks because they didn't make sense anymore.

NOTE: I noticed that you support python 2.7 (at least it seemed from the code), I am not sure if that would still work after this PR.

- Add Token class which auto refreshes token when it expires
- Add new entities
- Move most of the common CRUD methods for admin entities into a superclass
- Update few tests because of these changes (Still not all of them work)
@Peter-Slump
Copy link
Owner

Hi @pehala thanks for the changes! I see where you are going and I think it's a nice addition. However since there are breaking changes I decided to not pull it into master but use is as the base for a new major version. So I merged your work into the develop branch.

@pehala pehala mentioned this pull request May 5, 2020
pehala pushed a commit to pehala/python-keycloak-client that referenced this pull request Jun 9, 2021
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