JCL-335: Rework API and type hierarchy in accessgrant module by acoburn · Pull Request #461 · inrupt/solid-client-java

Supersedes #422, integrating the code in that PR into an implementation that does not break backwards compatibility and which does not leak VC implementation details.

This introduces a simple type hierarchy for the access grant module:

interface AccessCredential {}
class AccessGrant implements AccessCredential {}
class AccessRequest implements AccessCredential {}

And using that hierarchy, we have a clearer API:

CompletionStage<AccessGrant> grant = client.requestAccess(...).thenCompose(client::grantAccess);

Some of the existing APIs have been deprecated in favor of methods that make use of this hierarchy.