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

com.microsoft.alm.storage.windows.CredManagerBackedTokenStore 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.Token;
import com.microsoft.alm.secret.TokenType;
import com.microsoft.alm.storage.windows.internal.CredManagerBackedSecureStore;

public class CredManagerBackedTokenStore extends CredManagerBackedSecureStore {

    public static final String TOKEN_USERNAME = "PersonalAccessToken";

    @Override
    protected Token create(final String username, final String secret) {
        return new Token(secret, TokenType.Personal);
    }

    @Override
    protected String getUsername(final Token token) {
        return TOKEN_USERNAME;
    }

    @Override
    protected String getCredentialBlob(final Token token) {
        return token.Value;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy