Giter Site home page Giter Site logo

Comments (8)

mxr576 avatar mxr576 commented on August 15, 2024

@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.

shadcn avatar shadcn commented on August 15, 2024

@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.

mxr576 avatar mxr576 commented on August 15, 2024

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.

mxr576 avatar mxr576 commented on August 15, 2024

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.

Jaesin avatar Jaesin commented on August 15, 2024

Can't we just add the validation call to resolve this?

from apigee-edge-drupal.

mxr576 avatar mxr576 commented on August 15, 2024

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.

mxr576 avatar mxr576 commented on August 15, 2024

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.

image

image

from apigee-edge-drupal.

shadcn avatar shadcn commented on August 15, 2024

This is now fixed in #179

from apigee-edge-drupal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.