All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.microsoft.alm.storage.macosx.KeychainSecurityBackedTokenStore Maven / Gradle / Ivy

Go to download

Provides different kind of secure storage for storing secrets generated by the Authentication Library

There is a newer version: 0.6.4
Show newest version
// 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.Token;
import com.microsoft.alm.storage.SecretStore;

public class KeychainSecurityBackedTokenStore extends KeychainSecurityCliStore implements SecretStore {

    @Override
    public Token get(String key) {
        return readToken(key);
    }

    @Override
    public boolean add(String key, Token secret) {
        writeToken(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