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