-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #168 from scalecube/cleanup-configuration-in-vault
Get rid of dependency on environment variables in public configuration
- Loading branch information
Showing
6 changed files
with
209 additions
and
188 deletions.
There are no files selected for viewing
3 changes: 1 addition & 2 deletions
3
config-vault/src/main/java/io/scalecube/config/vault/EnvironmentVaultTokenSupplier.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
package io.scalecube.config.vault; | ||
|
||
import com.bettercloud.vault.EnvironmentLoader; | ||
import com.bettercloud.vault.VaultConfig; | ||
import java.util.Objects; | ||
|
||
public class EnvironmentVaultTokenSupplier implements VaultTokenSupplier { | ||
|
||
public String getToken(EnvironmentLoader environmentLoader, VaultConfig config) { | ||
public String getToken(VaultConfig config) { | ||
return Objects.requireNonNull(config.getToken(), "vault token"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
config-vault/src/main/java/io/scalecube/config/vault/VaultTokenSupplier.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
package io.scalecube.config.vault; | ||
|
||
import com.bettercloud.vault.EnvironmentLoader; | ||
import com.bettercloud.vault.VaultConfig; | ||
|
||
@FunctionalInterface | ||
public interface VaultTokenSupplier { | ||
|
||
String getToken(EnvironmentLoader environmentLoader, VaultConfig config); | ||
String getToken(VaultConfig config); | ||
} |
Oops, something went wrong.