This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
An app developer will first need to consider how a user creates an authenticated session. Depending on the application framework in use, there may already be
a valid OpenID Id Token. Alternatively, a developer may possess a set of client credentials. Both approaches are described below. In both cases, a client object
will be needed:
----------------------
var CLIENT = SolidClient.getClient();
----------------------
* Using an existing ID Token
All interactions with Solid resources happen in the context of a <<<Session>>>. If an existing Id Token is available, the <<<Session>>> can use that value. In this
case, it will be the responsibility of the application framework to refresh the Id Token upon expiration.
----------------------
var session = OpenIdSession.ofIdToken(idToken);
var client = CLIENT.session(session);
----------------------
* Using OAuth2 Client Credentials
Using <<<client_credentials>>>, an app developer can create a session that automatically refreshes upon token expiration.
----------------------
var session = OpenIdSession.ofClientCredentials(issuer, clientId, clientSecret, authMethod);
var client = CLIENT.session(session);
----------------------
With this <<<session>>> object, one can perform normal CRUD operations on Solid resources.
Please note that, with <<<SolidClient>>>, all operations are asynchronous. For synchronous operations, use <<<SolidSyncClient>>>.
The {{{https://inrupt.github.io/solid-client-java/apidocs/com/inrupt/client/examples/webapp/package-summary.html}web app example}} is a Quarkus application implementing a similar pattern to look up a user's WebID profile and then display the contents of a user's storage.
To set up the example application the following configuration values need to be added for this to work properly:
---------------------
quarkus.oidc.auth-server-url=<URL of Solid-OIDC server>
quarkus.oidc.client-id=<URL of Client Identifier>
---------------------
Remark: <<<client-id>>> is a {{{https://solidproject.org/TR/oidc#clientids-document}Client ID Document}}.
The above configuration values are typically added to a <<<./config/application.properties>>> file in the directory where the application is run.
The application will be available at <<<http://localhost:8080>>>.
** A sample CLI Application
The {{{https://inrupt.github.io/solid-client-java/apidocs/com/inrupt/client/examples/webapp/package-summary.html}cli app example}} is a CLI utility application interacting with a Solid Storage. It is making use of OAuth2 Client Credentials to access the Pod Storage.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JCL-162: installation documentation #256
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
JCL-162: installation documentation #256
Filter by extension
Viewed files
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.