Git Product home page Git Product logo

Comments (4)

AdrianKielbasa avatar AdrianKielbasa commented on June 12, 2024

How can I authorize a request? Is this in the documentation somewhere?

from create-client.

metaclass-nl avatar metaclass-nl commented on June 12, 2024

I guess the options are shown by the create-client program help:

    .option("--username [username]", "Username for basic auth (Hydra only)")
    .option("--password [password]", "Password for basic auth (Hydra only)")
    .option("--bearer [bearer]", "Token for bearer auth (Hydra only)")

code from https://github.com/api-platform/create-client/blob/main/src/index.js

from create-client.

AdrianKielbasa avatar AdrianKielbasa commented on June 12, 2024

@metaclass-nl I run command:
npm init @api-platform/client https://demo.api-platform.com src/ -- --generator react --resource book --username [email protected] --password Pa55w0rd

It still doesn't work

from create-client.

metaclass-nl avatar metaclass-nl commented on June 12, 2024

Branch chapter9-react of My own tutorial Api Platform does include instructions to generate code from an api that requires authentication but that is the api from the api branches of the tutorial itself and it also assumes you already have completed chapter 7 (authentication) *,

I do not know if they will work with the demo. My tutorial does not use the demo so i do no longer follow its developments. Sorry!

* You are advised anyway to start with chapter 1 and work your way up, unless you are familiar with the knowledge explained in the earlyer chapters.

from create-client.

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.