Skip to content

Conversation

@robitmoh
Copy link

@robitmoh robitmoh commented Apr 1, 2025

This PR adds Keycloak support to the CakeDC/Auth plugin, allowing users to authenticate through Keycloak OAuth2.

Features:

  • Added Keycloak mapper class to handle OAuth response
  • Implements role mapping between Keycloak and CakeDC roles
  • Configurable role mapping via configuration
  • Added documentation for Keycloak setup and integration

Technical details:

  • The mapper extracts user data and roles from Keycloak's UserInfo token
  • Supports case-insensitive role matching
  • Provides clear error messages for configuration issues
  • Allows custom role mapping via configuration

@ajibarra
Copy link
Member

@robitmoh Great contribution here! We are more than glad to merge it. Could you please take a look to failing tests? And also even when the CS check passed I see there are some issues. You could run composer cs-check in local to identify the issues.

I have also added some comments on the review.

Feel free to contact us for any question. We are looking forward to see the updates and merge the PR.

Thanks again.

@robitmoh
Copy link
Author

Hi @ajibarra
Thanks for the feedback! I've addressed the issues and pushed the fix. Let me know if anything else needs attention.

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