Class FixedContentKeySupplier

  • All Implemented Interfaces:
    SessionKeySupplier

    public class FixedContentKeySupplier
    extends Object
    implements SessionKeySupplier
    This is a SessionKeySupplier which fakes the ability to refresh its contained key.

    It is initialised once with fixed values of private key and (optional) passphrase; that key is always returned.

    • Constructor Detail

      • FixedContentKeySupplier

        public FixedContentKeySupplier​(String privateKeyContents,
                                       char[] passphrase)
    • Method Detail

      • refreshKeys

        public void refreshKeys()
        Description copied from interface: SessionKeySupplier
        If the auth service-issued security token expires, the federation client will try to re-generate a new set of keys by calling this method.

        The implementer should create a new pair of keys for security reasons.

        Refreshing keys should not be a long-running blocking call. You can refresh keys in an async thread and return from this method immediately. When the async process is done refreshing the keys, the client code will automatically pick up the latest set of keys and update the security token accordingly

        Specified by:
        refreshKeys in interface SessionKeySupplier