CredentialPersistenceOptions interface
支持持久令牌缓存的凭据的共享配置选项。
属性
token |
存储凭据时提供给持久性层的选项(如果有)。 必须首先注册持久性提供程序插件。 请参阅 NPM 上的 例:
|
属性详细信息
tokenCachePersistenceOptions
存储凭据时提供给持久性层的选项(如果有)。
必须首先注册持久性提供程序插件。 请参阅 NPM 上的 @azure/identity-cache-persistence
包。
例:
import { useIdentityPlugin, DeviceCodeCredential } from "@azure/identity";
useIdentityPlugin(cachePersistencePlugin);
const credential = new DeviceCodeCredential({
tokenCachePersistenceOptions: {
enabled: true,
},
});
tokenCachePersistenceOptions?: TokenCachePersistenceOptions