Comments (8)
@arshad This works are expected, only Apigee prefixed key providers can do validation on the Key form because they are defined by the Apigee Edge module. Others can only validate on the Authentication form, which is the main configuration page for Apigee Edge authentication set up.
So you can change the Key provider on the Key configuration form to anything but then you have to go back the Authentication form to Send a request if the Key provider is not an Apigee prefixed one.
from apigee-edge-drupal.
@mxr576 Sorry I don't follow.
apigee_auth
is shipped with the Apigee Edge module. Can't we check if the values provided are valid credentials in \Drupal\apigee_edge\Plugin\KeyType\ApigeeAuthKeyType::validateKeyValue
?
We are already doing some missing and empty field validations in there.
from apigee-edge-drupal.
Yeah, I did some digging as well since my comment and I'll look into this whether it is possible to do that there. My gut says Peter must have had a reason for not doing this validation there but we'll see.
from apigee-edge-drupal.
Okay, so probably the reason why Peter did not use this validateKeyValue()
because it does not get called on the Authentication form. The reason for that is how the Key module's entity edit form got "included" in the Authentication form. Basically, it is a copy-paste from the Key module and it tries to replicate what Key module does when it processes a form and saves the submitted values. Calling validateKeyValue() is missing from the replicated behavior.
The way how this form was implemented originally in #103 caused way too many problems for us in the past. We tried to improve that implementation without rebuilding the form (#152) but this issue and #176 are the perfect examples that it is impossible to maintain the current solution.
In my PR, I'll try to expose a customized version of the KeyEditForm form on the AuthenticationForm which is something similar that I suggested when #103 was in progress.
from apigee-edge-drupal.
Can't we just add the validation call to resolve this?
from apigee-edge-drupal.
We can and wait for the next issue to occur... it could happen that Key module will add extra steps to Key creation/update process that we won't even notice because of the current implementation.
Also, if we would just add the missing validation callback to the Authentication form then Key's own add/edit form would not validate the provided credentials still. (Which is the original issue is about.)
from apigee-edge-drupal.
Okay, it seems my idea is working, we can even expose the key provider configuration as an "Advanced settings" on the Authentication form so we can reduce the navigation hell between the Authentication form and the Key edit form.
from apigee-edge-drupal.
This is now fixed in #179
from apigee-edge-drupal.
Related Issues (20)
- Filter the Apis Products showing on create app form using ajax. HOT 4
- Support for Drupal 10.2 in Github action HOT 1
- seeking advice to automate Sync Api Products tasks HOT 7
- Prevent Team or Organization having Zero members HOT 4
- Remove support of Drupal 9 in Github actions HOT 1
- Roles column of "Pending Invitations" view is empty for most users HOT 1
- Uncaught PHP Exception TypeError ... /apigee_edge/src/Entity/Developer.php line 526 HOT 3
- PHPCS issue reflecting on test & lint due to vendor version upgrade
- Code Coverage report upload issues with codecov-actionsv3
- Error Deprecated function: Creation of dynamic property Drupal\apigee_edge\Entity\Developer::$original is deprecated HOT 9
- Test case for new validation constraint
- WSOD while creating select list field on Developer Apps & Team Apps
- apigee_edge_teams.team_settings:enablefilter missing schema HOT 1
- Add support of PHP8.3 for Apigee Edge module
- Cacheability information is lost when team based API product access is calculated
- Getting Apigee\Edge\Exception\ApiRequestException: cURL error 7: when trying to connect to Apigee Edge OPDK v4.52.00 from Drupal 9.5 HOT 6
- Enable pager for Developer purchased plans & Team Apps HOT 4
- Some users with many subscriptions are unable to view the create new app form HOT 4
- Github Actions test error - ApigeeX tests running on Edge throws error & Functional Javascript issue for chrome=126.***.6478.126 HOT 2
- Form actions not respect multiple language redirection HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apigee-edge-drupal.