Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Create clients from library #66

Open
GratienDSX opened this issue Jul 27, 2022 · 1 comment
Open

Create clients from library #66

GratienDSX opened this issue Jul 27, 2022 · 1 comment

Comments

@GratienDSX
Copy link

Hello there, thank you for this library that looks great.

I haven't found the possibility to create clients programmatically directly from the library, is it something planned? If not, I might open a PR to do so.

@Jonatha-Varjao
Copy link

Hi @GratienDSX , I think it's possible to create clients programmatically
it'll be something like this

idp = FastAPIKeycloak(
    server_url="http://localhost:8085/auth",
    client_id="test-client",
    client_secret="GzgACcJzhzQ4j8kWhmhazt7WSdxDVUyE",
    admin_client_secret="BIcczGsZ6I8W5zf0rZg5qSexlloQLPKB",
    realm="Test",
    callback_uri="http://localhost:8081/callback"
)
idp.create_user(first_name=first_name, last_name=last_name, username=email, email=email, \
password=password.get_secret_value(), id=id)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants