/** * Copyright (c) 2020, 2021 Oracle and/or its affiliates. All rights reserved. * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. */ /** * Objects such as credentials may optionally implement this * interface to provide the capability to refresh itself. * For example, a credential with a particular time-restricted lifespan * may implement this interface to allow callers to refresh the time period * for which it is valid. * */ export default interface Refreshable { /** * Determine if this Object is current. * @return true if this object is currently current, false otherwise. */ isCurrent(): boolean; /** * Update or extend the validity period for an Object. */ refresh(): void; }