The generator for the Kinde Java SDK.
This generator creates an SDK in Java 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.
-
Clone the repository to your machine:
git clone https://github.com/kinde-oss/kinde-java-generator
-
Go into the project:
cd kinde-java-generator -
Install the OpenAPI Generator tool:
Run the following command to generate the SDK:
openapi-generator-cli generate -i kinde.yml -g spring -c kinde-config.yml -o kinde-java-sdk --skip-validate-specOR
openapi-generator generate -i kinde.yml -g spring -c kinde-config.yml -o kinde-java-sdk --skip-validate-specNote: The API specifications should always point to Kinde's hosted version: https://kinde.com/api/kinde-mgmt-api-specs.yaml. This is set via the -i option in the OpenAPI Generator CLI, for example:
openapi-generator-cli generate -i https://kinde.com/api/kinde-mgmt-api-specs.yamlThe SDK gets outputted to: kinde-java-sdk, which you can enter via:
cd kinde-java-sdkJava SDK
Add the following dependency in pom.xml after generation:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
Afterwards make following changes in pom.xml
1. Locate the <build> section within the pom.xml file.
2. Replace the <build> with following
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
<configuration>
<finalName>kindejava</finalName>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<classifier>exec</classifier>
</configuration>
</plugin>
</plugins>
</build>
Please refer to Kinde’s contributing guidelines.
By contributing to Kinde, you agree that your contributions will be licensed under its MIT License.