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

com.microsoft.alm.storage.windows.CredManagerBackedTokenPairStore 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.windows;

import com.microsoft.alm.secret.TokenPair;
import com.microsoft.alm.storage.windows.internal.CredManagerBackedSecureStore;

public class CredManagerBackedTokenPairStore extends CredManagerBackedSecureStore {

    public static final String TOKEN_PAIR_USERNAME = "Azure Active Directory Access and Refresh Token";
    @Override
    protected TokenPair create(final String username, final String secret) {
        return TokenPair.fromXmlString(secret) ;
    }

    @Override
    protected String getUsername(final TokenPair tokenPair) {
        return TOKEN_PAIR_USERNAME;
    }

    @Override
    protected String getCredentialBlob(final TokenPair tokenPair) {
        return TokenPair.toXmlString(tokenPair);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy