Skip to content

# Keycloak OAuth Integration for CakeDC/Auth # #100

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

Open
wants to merge 10 commits into
base: 10.next-cake5
Choose a base branch
from

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