com.microsoft.alm.storage.macosx.KeychainSecurityBackedTokenPairStore Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of auth-secure-storage Show documentation
Show all versions of auth-secure-storage Show documentation
Provides different kind of secure storage for storing secrets generated by the Authentication Library
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See License.txt in the project root.
package com.microsoft.alm.storage.macosx;
import com.microsoft.alm.secret.TokenPair;
import com.microsoft.alm.storage.SecretStore;
public class KeychainSecurityBackedTokenPairStore extends KeychainSecurityCliStore implements SecretStore {
@Override
public TokenPair get(final String key) {
return readTokenPair(key);
}
@Override
public boolean add(final String key, final TokenPair secret) {
writeTokenPair(key, secret);
return true;
}
/**
* Keychain Access is secure
*
* @return {@code true} for Keychain Access
*/
@Override
public boolean isSecure() {
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy