Git Product home page Git Product logo

akeneoapp-demo's Introduction

Start App PHP Symfony

Requirements

  • You’ve got a PIM developer sandbox. If not, please contact us (https://www.akeneo.com/contact/)
  • You’ve installed Docker (20.10.22 or higher)
  • You’ve installed Docker Compose V2 plugin (see the official installation tutorial here)

Step 1: Get this App on your local machine

Get the whole Sample-Apps repository and navigate to the PHP Symfony start app folder

git clone [email protected]:akeneo/sample-apps.git
cd samples/start-app/php-symfony

Step 2 (optional): Create a tunnel to expose your local App

Use ngrok to create a tunnel that allows your App to be accessed using a unique HTTPS URL. You need to create a ngrok account and auth token to preview your App.

ngrok http 8081

We recommend to generate an authtoken too. If you do not, you may need to restart the installation and connection process.

If everything goes well the command will output your public URL for your local App :

img.png

Step 3: Declare your local App as a test App in your sandbox to generate credentials

  1. In your sandbox go to Connect > App store > Create a test App
  2. Paste your callback & activation URLs
Name: [My App]
Activate URL: [your-url]/activate
Callback: [your-url]/callback

img.png

The App generates the credentials. Copy them for later.

img.png

Step 4: OpenID Connect

OpenID Connect is a simple identity layer on top of the OAuth 2.0 protocol, implemented in Akeneo PXM Studio to authenticate users. This is an optional feature in Apps, you can also use your own Authentication. To learn more, check the complete documentation.

Next step will let you choose whether you want to use this feature in your app, or not. OpenId related code is clearly identified within the app to allow a fast and easy modification.

Step 5: Launch your App

Open a terminal at the root of the folder of your App, enter the following command and let us guide you

make install

For information, this command launch scripts locate into common/bin/install in the root folder:

Step 6: Activate your test App for your sandbox

  1. Back in your sandbox go to Connect > App store

  2. You see your App in the section “My App” img.png

  3. Click on CONNECT

  4. Follow the activation process steps until the end

If everything is good, you should see img.png

It means your App is connected. Well done!

Step 7: Call your first API endpoint

Last but not least, let’s call the PIM API! Simply go here.

You should see img.png

You will find a pre-configured HTTP client here . Feel free to use it for your project.

Voilà! You are ready for developing your App!

update the access scopes

If a user updates the access scopes of an already connected app, the access scope update process will require app users to provide consent for the addition of new scopes. You can notify the PIM that the app requires an authorization update using this endpoint:

[your-url]/notify-authorization-update

What's next?

  • Want to get your PIM data to your App? Have a look to our guided tutorials
  • Need some tools? Have a look to our dedicated page: we have, with others, a Postman collection that may you during your development.

akeneoapp-demo's People

Contributors

sanhacks avatar

Watchers

 avatar

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.