Package jetbrains.buildServer.serverSide
Interface CredentialsStorage
-
- All Superinterfaces:
ServerExtension
,TeamCityExtension
- All Known Subinterfaces:
CredentialsStorageEx
- All Known Implementing Classes:
ProjectCredentialsStorage
,TruncatingPrefixCredentialsStorageEx
public interface CredentialsStorage extends ServerExtension
Credentials storage extension.- Since:
- 2017.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
findTokenForSecureValue(String secureValue, SProject contextProject)
Finds already existing token for the secure valueString
getType()
String
mapSecureValueToToken(String secureValue, SProject contextProject)
Maps some secure value (password or api token) to some other token which can be safely stored in configuration files.String
mapTokenToSecureValue(String token, SProject contextProject)
Maps token to secure value if there is such a value in this credentials storage.
-
-
-
Method Detail
-
getType
@NotNull String getType()
- Returns:
- type of this credentials storage. This type will be added by core API as a prefix to all tokens generated by this storage.
-
mapSecureValueToToken
@NotNull String mapSecureValueToToken(@NotNull String secureValue, @NotNull SProject contextProject)
Maps some secure value (password or api token) to some other token which can be safely stored in configuration files.- Parameters:
secureValue
- secure valuecontextProject
- context project where such mapping is performed- Returns:
- new or existing token corresponding to provided secure value
-
findTokenForSecureValue
@Nullable String findTokenForSecureValue(@NotNull String secureValue, @NotNull SProject contextProject)
Finds already existing token for the secure value- Parameters:
secureValue
- secure valuecontextProject
- context project where search is performed- Returns:
- existing token for the secure value or null if none found
-
mapTokenToSecureValue
@Nullable String mapTokenToSecureValue(@NotNull String token, @NotNull SProject contextProject)
Maps token to secure value if there is such a value in this credentials storage.- Parameters:
token
- tokencontextProject
- context project where such mapping is performed- Returns:
- secure value corresponding to token pr null if there is no such value
-
-