-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
TPROD-170: Enabling 2-legged authentication for Mautic #9837
Conversation
Add prefix to table name in foreign key constraint Adding unit test Fixing namespace issue in test class Fixing migration issue and adding AuditLog username Making user_id field nullable for client_credentials grant type Cascade persist role in oauth_client Fixing role_id issue in oauth2_clients table Tweaked the audit log name and captured first/last name for "created by metadata"
Codecov Report
@@ Coverage Diff @@
## features #9837 +/- ##
==============================================
+ Coverage 39.28% 39.31% +0.02%
- Complexity 34302 34310 +8
==============================================
Files 2035 2035
Lines 108409 108437 +28
==============================================
+ Hits 42592 42630 +38
+ Misses 65817 65807 -10
|
When I switch to OAuth2 in the dropdown with this PR applied before doing anything I get the following error:
Perhaps the PR was not yet finished, or this may be a bug. |
Creating the credentials I get this error:
I think that the PR is indeed still a WIP, maybe @dongilbert did not have time to get it completed on Friday? Or maybe there is a missing step in the test instructions - will double check for migrations etc. |
Blocked from testing due to this issue #9848 which is currently preventing migrations being applied - should be fixed soon though! |
…e running migration
@RCheesley I pushed the commit that fixed the support for M2 schema. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mabumusa1 and @kuzmany for testing! I was blocked by the bug that prevented applying migrations - this has been fixed in #9850 |
@kuzmany created a new issue for that! |
@dongilbert thanks dude ! We absolutely need a PR on developer documentation for that ! |
Do Acquia have already support for API library of this? Or wee need create it? |
@kuzmany I just asked and they do not use this so we'd have to implement support for this in the community if we need it. |
Description:
This PR adds support for a 2-legged OAuth2 authentication to the Mautic API using the
client_credentials
grant.Steps to test this PR:
oauth/v2/token
(Postman would be a good way to do this){ "grant_type": "client_credentials", "client_id": "YOUR_CLIENT_ID_FROM_STEP_4", "client_secret": "YOUR_CLIENT_SECRET_FROM_STEP_4" }
access_token
in the response. Copy that.api/assets
. In the header, send the Authorization header with the above tokenBC Breaks
WIP