Develop app for local Pod

Hi,
I recently learnt more about Solid and I am very excited with the idea! It is valuable even now when the technology is not widespread!
Now I am impatient to:

  • host one or more Pods
  • develop Solid applications

Honestly, I hoped it would be easier…

I followed Getting Started — Inrupt Java Client Libraries and then installed the CSS. Now I have a lot of questions and I hope you will tolerate bothering you with them.

First of all I tried to use the Java app from the guide with my local Pod. For that I suppose I need application registration functionality. I prepared the following query for this purpose:

curl -X POST http://localhost:3000/idp/register
-H “Content-Type: application/json”
-d ‘{
“client_name”: “My Solid App”,
“redirect_uris”: [“some url”],
“grant_types”: [“authorization_code”, “refresh_token”],
“response_types”: [“code”],
“scope”: “openid profile offline_access”,
“token_endpoint_auth_method”: “client_secret_basic”
}’

It works well with inrupt dot net, but it returns 401 with my CSS installation.

Here is how I start the CSS:

npx @solid/community-server -c @css:config/file.json -f .data

where file.json is the one from the github repo for CSS.

Thanks in advance!

P.S. Is there any how-to documentation I can use?

1 Like

Hi there, welcome to the Solid Forum :D.

Is there any reason why you want to use Java to create your app? Currently, there are a lot more tools if you’re trying to implement a Web App (using Javascript/TypeScript). And nowadays, you can achieve pretty much anything you could achieve with a native app in the web.

You can find about some web-based tools in https://rdfjs.dev and Tools and libraries overview · Solid

It’s perfectly fine if you want to use Java though, just keep in mind it will be harder as there are less resources. I guess it also depends on what you have experience building, have you built any web apps in the past? or apps with Java?

1 Like

Hi Noel and thanks for your reply! I read about your work and I share your excitement with solid!
Yeah - my expereience is with Java and not very much with js/ts.
Thanks for the links! I tried “Tools and libraries” and almost nothing worked for me :sweat_smile: Nevertheless, is more likely I don’t know how to use them than them being outdated/not maintained. It is quite a bumpy ride for sure.

2 Likes

Unfortunately there is no standard way for a bot to authenticate to a server. CSS does it differently than NSS (inrupt.net) does and different than ESS (inrupt.com) does. You need to look up the specifics for CSS. Browser access is more standardized.

Thanks for the reply, @jeffz!
I’m puzzled, though. I thought I just can’t find the proper documentation. I either don’t get it or what you are saying implies that applications shall care if they are dealing with CSS/NSS/ESS/etc. when authorizing against a POD. One would expect there to be a standard approach that works regardless of the Solid Store.

Yes, one would expect that. But Solid is evolving. There are some areas where standardization is not complete and authenticating bots is one.

Thanks for joining us.

It looks like you’re trying to do Solid-OIDC. I would need to see the exact 401 error to help you further, but I believe you are missing the “webid” scope in your “scopes” array, and should get rid of “profile”. If that doesn’t work/help, you can always use the client credentials authentication method if that will fit your use case.