Skip to content

kinde-oss/php-sdk-generator

Repository files navigation

Kinde PHP generator

The generator for the Kinde PHP SDK.

PRs Welcome Kinde Docs Kinde Community

Overview

This generator creates an SDK in PHP that can authenticate to Kinde using the Authorization Code grant or the Authorization Code with PKCE grant via the OAuth 2.0 protocol. It can also access the Kinde Management API using the client credentials grant.

Also, see the SDKs section in Kinde’s contributing guidelines.

Usage

Requirements

You will need the following tools to be able to generate the SDK.

GNU Make

GNU Make is installed by default on most Linux distributions and MacOS, if however it is not available on your operating system, please consult the documentation here.

Initial set up

  1. Clone the repository to your machine:

    git clone https://github.com/kinde-oss/php-sdk-generator.git
  2. Go into the project:

    cd ./php-sdk-generator
  3. Install the OpenAPI Generator tool:

    https://openapi-generator.tech/docs/installation

SDK generation

Run the following command to generate the SDK:

make build-php

Please be sure to run make clean prior to running the above command, to clean up any generated SDKs. In addition please change your business name in kinde-mgmt-api-specs.yaml before generating the SDK.

...
servers:
  - url: https://{businessName}.kinde.com
    variables:
      businessName:
        description: Business Name created in the Kinde Console
        default: YOUR_BUSINESS_NAME // <-- Change here
...

Note: The API specifications should always point to Kinde's hosted version: https://kinde.com/api/kinde-mgmt-api-specs.yaml. Please ensure that this file is the same as that of the hosted version before generating the SDK.

The SDK gets outputted to: ./out/kinde-php-sdk, which you can enter via:

cd ./out/kinde-php-sdk

SDK documentation

PHP SDK

Development

The instructions provided in the "Usage" section above are sufficient to get you started.

Contributing

Please refer to Kinde’s contributing guidelines.

License

By contributing to Kinde, you agree that your contributions will be licensed under its MIT License.