JCL-279: Implement token cache for session objects by acoburn · Pull Request #459 · inrupt/solid-client-java
This makes use of the new ClientCache<K, V> mechanism, applying it to session credential objects.
This required inverting one section of the ReactiveAuthorization class. Before, the Authenticator::authenticate method accepted a Session parameter. Now, the Session::authenticate method accepts an Authenticator parameter:
| return session.authenticate(auth, request, algorithms); |
The previously used method is now deprecated.
This also changes the way the OpenIdSession::fromCache works. Previously, any fromCache requests returned an OpenId credential, which incorrectly bypasses reactive authorization. In this case, the is still only a single credential, but the internal cache keeps track of which URIs have performed reactive authorization and (provided that the credential is still valid), that ID Token credential will be provided.