Interface CredentialsStorage

    • 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 value
        contextProject - 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 value
        contextProject - 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 - token
        contextProject - context project where such mapping is performed
        Returns:
        secure value corresponding to token pr null if there is no such value