Skip to content

Commit

Permalink
allowing credential to be chosen without a new build
Browse files Browse the repository at this point in the history
  • Loading branch information
zmarois committed Mar 22, 2018
1 parent 3977506 commit 010c5d1
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,15 @@ protected void configure() {
bind(IFileCryptography.class).annotatedWith(Names.named("filecryptoalgorithm")).to(PgpCryptography.class);
bind(ICredentialGeneric.class).annotatedWith(Names.named("gcscredential")).to(GcsCredential.class);
bind(ICredentialGeneric.class).annotatedWith(Names.named("pgpcredential")).to(PgpCredential.class);
bind(ICredential.class).to(ClearCredential.class);
try
{
Class credentialImplementation = Class.forName(System.getProperty("ICREDENTIAL_IMPLEMENTATION", ClearCredential.class.getTypeName()));
bind(ICredential.class).to(credentialImplementation);
}
catch (ClassNotFoundException e)
{
throw new RuntimeException(e);
}
bind(IDeadTokenRetriever.class).to(DeadTokenRetriever.class);
bind(IPreGeneratedTokenRetriever.class).to(PreGeneratedTokenRetriever.class);
bind(INewTokenRetriever.class).to(NewTokenRetriever.class);
Expand Down

0 comments on commit 010c5d1

Please sign in to comment.