Using Inrupt Solid Java Client with CSS

Hi, I’m new to Solid and the Solid ecosystem am have been following some tutorials. I have set up a local development environment using the Community Solid Server and have been able to create some collections and add some RDF data and retrieve it all OK using the Inrupt solid-client-java library without authentication turned on in CSS. Now I have enabled webacl.json in CSS I have hit some difficulties. I created a credential token for my pod in CSS and then tried to create a session as follows (N.B. this is Scala code):-

private val session: Session = 
OpenIdSession.ofClientCredentials(
  new URI("http://localhost:3000/"),
  "{MY_TOKEN_IDENTIFIER}",
  "{MY_TOKEN_SECRET}",
  "client_secret_basic"
)

Running this results in an exception as follows:

Execution exception\[\[CompletionException: com.inrupt.client.openid.OpenIdException: Unable to parse ID token\]\]

When I debug the step to create a session I can see that the response from CSS does not include an ID Token but rather an Access Token. I don’t know if this means the Inrupt Java client is incompatible with CSS or whether I am doing something wrong. Any suggestions please?

1 Like

I would recommend going through the Community Solid Server documentation and following the examples on authenticating with their service. While CSS and ESS (Enterprise SOLID Server by Inrupt) are both SOLID compliant, the OIDC specification and interoperability is consistent currently, but should be more stable in the future.

1 Like

OK, I think you mean inconsistent, which would make more sense. I don’t think the CSS documentation mentions the Inrupt Java Client but the tutorials reference the Inrupt JavaScript authentication client - is this what most people are using to authenticate currently?

1 Like

This authentication problem is also discussed in the discussions on the Github of the Community Solid Server. Maybe you learn something more here: Client Credential Flow & Inrupt Java Library · CommunitySolidServer/CommunitySolidServer · Discussion #1687 · GitHub

1 Like

Thanks Siemen, I hadn’t seen that discussion. It is definitely related so I will add my observations there.

1 Like