Skip to content

kinde-oss/kinde-elixir-sdk-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Kinde Elixir Generator

The generator for the Kinde Elixir SDK.

PRs Welcome Kinde Docs Kinde Community

Overview

This generator creates an SDK in Elixir 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

Initial set up

  1. Clone the repository to your machine:

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

    cd kinde-elixir-sdk-generator
  3. Install the OpenAPI Generator tool:

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

SDK generation

Run the following commands to generate the SDK:

openapi-generator-cli generate -i kinde.yml -g elixir -c kinde-config.yml -o kinde-elixir-sdk --skip-validate-spec

Note: Instead of openapi-generator-cli, you can also use: openapi-generator.

The SDK gets outputted to: kinde-elixir-sdk, which you can enter via:

cd kinde-elixir-sdk

SDK documentation

Elixir SDK

Development

Update config file

kinde-config.yml is the config file that generates the SDK files, and you will need to update the config file with the SDK file paths.

Change the first part of the file list to the path of the SDK files. In case the SDK is located at the previous directory, no changes are needed to be made.

For example, the YAML file will become for each file from:

../kinde-elixir-sdk/lib/kinde_sdk/sdk/authorization_code.ex:
    destinationFilename: lib/kinde_sdk/sdk/authorization_code.ex

To:

/path/to/sdk/authorization_code.ex:
    destinationFilename: lib/kinde_sdk/sdk/authorization_code.ex

Dependencies

Install the following dependency after generation:

{:plug, "~> 1.13"},
{:plug_cowboy, "~> 2.0"},
{:jason, "~> 1.3"},
{:httpoison, "~> 0.7"}

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.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published