Skip to content
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

PRE-2604: get the client id and scret mask from user-manager #85

Merged

Conversation

ilajili
Copy link
Contributor

@ilajili ilajili commented Oct 2, 2024

Description

Retrieve client_id and client_secret_mask from the user manager using the Kratos session.

Changes Made

Authentication.php Updates

  • Method: getClientIdAndSecretMask():

    • Added to retrieve client_id and client_secret_mask from the user manager resource, utilizing the session cookie for authentication.
  • Method: setKratosSession():

    • Added to create the session cookie string. This method should be called from the plugin to set its value.

HttpClient.php Updates

  • Method: get():

    • Added a $cookie parameter to allow passing session cookies directly in the request.
  • Method: request():

    • Modified to accept and set the cookie in the HTTP headers for requests. This ensures that the correct session information is sent with the user manager call.
    • Included CURLOPT_FOLLOWLOCATION to ensure that the client follows HTTP redirects automatically, which is important for functionality.

APIRoutes.php Updates

  • Added $USER_MANAGER_RESOURCE.
  • Added setUserManagerResource() to be called inside plugins to set the value of $USER_MANAGER_RESOURCE in an environment test.

Testing

  • Covered getClientIdAndSecretMask() with unit tests.

@ilajili ilajili force-pushed the PRE-2604-Unified-Authent-request-client-id-and-secret branch 5 times, most recently from 70c4430 to 079cbb6 Compare October 2, 2024 16:25
@ilajili ilajili self-assigned this Oct 2, 2024
@ilajili ilajili marked this pull request as draft October 2, 2024 16:49
@ilajili ilajili force-pushed the PRE-2604-Unified-Authent-request-client-id-and-secret branch from 079cbb6 to 78cc939 Compare October 2, 2024 16:53
@hdelaforce-payplug hdelaforce-payplug force-pushed the PRE-2604-Unified-Authent-request-client-id-and-secret branch 2 times, most recently from a103787 to 105f3f1 Compare October 4, 2024 13:51
@jhoaraupp jhoaraupp self-requested a review October 7, 2024 16:07
@ilajili ilajili force-pushed the PRE-2604-Unified-Authent-request-client-id-and-secret branch 5 times, most recently from 8e334f2 to c761007 Compare October 11, 2024 09:17
@ilajili ilajili force-pushed the PRE-2604-Unified-Authent-request-client-id-and-secret branch 4 times, most recently from ee6f292 to bed4a68 Compare October 18, 2024 09:17
@ilajili ilajili marked this pull request as ready for review October 18, 2024 09:18
@ilajili ilajili force-pushed the PRE-2604-Unified-Authent-request-client-id-and-secret branch from bed4a68 to aa76035 Compare October 18, 2024 10:04
@hdelaforce-payplug hdelaforce-payplug self-requested a review October 18, 2024 15:03
@ilajili ilajili force-pushed the PRE-2604-Unified-Authent-request-client-id-and-secret branch 2 times, most recently from e3e3009 to 46618b9 Compare October 21, 2024 11:05
@ilajili ilajili marked this pull request as draft October 21, 2024 12:38
@ilajili ilajili force-pushed the PRE-2604-Unified-Authent-request-client-id-and-secret branch 13 times, most recently from 16459aa to 25241bd Compare October 28, 2024 17:36
@ilajili ilajili force-pushed the PRE-2604-Unified-Authent-request-client-id-and-secret branch from 25241bd to 87d7e54 Compare October 28, 2024 17:38
@ilajili ilajili marked this pull request as ready for review November 4, 2024 09:01
@ilajili ilajili merged commit 753de15 into develop Nov 4, 2024
8 checks passed
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.

3 participants