python-keycloak-client icon indicating copy to clipboard operation
python-keycloak-client copied to clipboard

realm.open_id_connec code except throwing a missing argument error

Open chrisadkin-zz opened this issue 4 years ago • 0 comments

I'm running code based on this excerpt:

from keycloak.realm import KeycloakRealm

realm = KeycloakRealm(server_url='https://example.com', realm_name='my_realm')

oidc_client = realm.open_id_connect(client_id='my-client',
                                    client_secret='very-secret-client-secret')

It is throwing the following error:

Missing argument in parameter list.
+ CategoryInfo : ParserError: ( : ) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingArgument

I suspect that realm package has changed since the documentation was last updated and that it now needs a third argument, self - populated from the contents of config.py ?

chrisadkin-zz avatar Aug 12 '21 15:08 chrisadkin-zz