Prerequisites#
JDK#
The Java client libraries requires JDK 11+. This tutorial uses JDK 17.
IDE#
Use an IDE of your choice.
WebID and Solid Pod#
Note
To get a WebID and a Pod on PodSpaces:
Go to PodSpaces.
To create an account, you must agree to the Inrupt’s Terms of Service. To agree, select the checkbox.
If you agree to Inrupt’s Terms of Service, click on Create an Account.
If you have not register an account with the Inrupt Identity Provider, click on Sign up link to create an account:
Fill in your username, email, and password.
Click Sign up. You are sent a verification email.
Check your email for the verification email. Follow the instructions in the email to verify.
Tip
Check your spam if you do not see the email in your inbox.
Once verified, return to click Continue to go to the Sign in page:
Enter your username and password.
Click Sign in to your account.
The screen displays the access required to continue.
To allow and continue, click Continue.
The application displays:
Your WebID:
https://id.inrupt.com/{username}
.Your Solid Pod:
https://storage.inrupt.com/{Pod Identifier}
Client Credentials#
Inrupt’s PodSpaces provides an Application Registration page where you can statically register your applications to generate credentials for them.
Go to PodSpaces Application Registration page.
If not already logged in, you will redirect to the login page. Log in with your username and password.
In the Register an app textbox, enter your application’s name and click Register.
The Client ID and Client Secret for your application appears under Apps You’ve Registered list.
Warning
Safeguard your Client ID
and Client Secret
values. Do not share these with any third parties as anyone with
your Client ID
and Client Secret
values can
impersonate you and act fully on your behalf.
Initialized Spring Boot Web Project#
Note
This tutorial assumes an initialized Spring Boot Web Maven Java Project or Spring Boot Web Gradle Kotlin Project.
For Java, this tutorial uses Spring Boot Web Maven project. Initialize a Spring Boot Web Maven/Java project.
If you are initializing a new project at https://start.spring.io/, specify the following:
Project |
Select |
||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Language |
Select |
||||||||||||||
Spring Boot |
Select a version. |
||||||||||||||
Project Metadata |
|
||||||||||||||
Dependencies |
Spring Web |
Click Generate.
Once you have generated and downloaded the resulting zip
file,
unzip the file to your destination directory and open the project in
your IDE.
For Kotlin, this tutorial uses Spring Boot Web Gradle project. Initialize a Spring Boot Web Gradle Kotlin project.
If you are initializing a new project at https://start.spring.io/, specify the following:
Project |
Select |
||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Language |
Select |
||||||||||||||
Spring Boot |
Select a version. |
||||||||||||||
Project Metadata |
|
||||||||||||||
Dependencies |
Spring Web |
Click Generate.
Once you have generated and downloaded the resulting zip
file,
unzip the file to your destination directory and open the project in
your IDE.