@Test public void checkCachingWithCachingDisabled() { OutgoingLinkSettings linkSettings = createOutgoingSettings(Duration.ofMinutes(0)); JwtHs256BearerTokenSupplier tokenSupplier = new JwtHs256BearerTokenSupplier(secretBytesSupplier, linkSettings); tokenSupplier.get(); tokenSupplier.get(); verify(secretBytesSupplier, times(2)).get(); }
@Override public String get() { try { return this.ilpOverHttpAuthTokens.get(outgoingLinkSettings.jwtAuthSettings().get().tokenSubject()); } catch (ExecutionException e) { throw new RuntimeException(e); } }
JwtHs256BearerTokenSupplier implements BearerTokenSupplier { @Override public String get() { try { return this.ilpOverHttpAuthTokens.get(outgoingLinkSettings.jwtAuthSettings().get().tokenSubject()); } catch (ExecutionException e) { throw new RuntimeException(e); } } }
JwtHs256BearerTokenSupplier implements BearerTokenSupplier { @Override public String get() { try { return this.ilpOverHttpAuthTokens.get(outgoingLinkSettings.jwtAuthSettings().get().tokenSubject()); } catch (ExecutionException e) { throw new RuntimeException(e); } } JwtHs256BearerTokenSupplier(
      final SharedSecretBytesSupplier sharedSecretBytesSupplier,
      final OutgoingLinkSettings outgoingLinkSettings
  ); }
JwtHs256BearerTokenSupplier implements BearerTokenSupplier { @Override public String get() { try { return this.ilpOverHttpAuthTokens.get(outgoingLinkSettings.jwtAuthSettings().get().tokenSubject()); } catch (ExecutionException e) { throw new RuntimeException(e); } } JwtHs256BearerTokenSupplier(
      final SharedSecretBytesSupplier sharedSecretBytesSupplier,
      final OutgoingLinkSettings outgoingLinkSettings
  ); @Override String get(); }
JwtHs256BearerTokenSupplier implements BearerTokenSupplier { @Override public String get() { try { return this.ilpOverHttpAuthTokens.get(outgoingLinkSettings.jwtAuthSettings().get().tokenSubject()); } catch (ExecutionException e) { throw new RuntimeException(e); } } JwtHs256BearerTokenSupplier(
      final SharedSecretBytesSupplier sharedSecretBytesSupplier,
      final OutgoingLinkSettings outgoingLinkSettings
  ); @Override String get();  }