Skip to content

Commit

Permalink
pr remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
wolf4ood committed Oct 19, 2023
1 parent cc1e5a0 commit 76e1e74
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ public class IatpDefaultServicesExtension implements ServiceExtension {
@Inject
private Clock clock;

@Provider(isDefault = true)
public TrustedIssuerRegistry createInMemoryIssuerRegistry() {
return new DefaultTrustedIssuerRegistry();
}

@Provider(isDefault = true)
public SecureTokenService createDefaultTokenService(ServiceExtensionContext context) {
context.getMonitor().info("Using the Embedded STS client, as no other implementation was provided.");
Expand All @@ -67,11 +72,6 @@ public SecureTokenService createDefaultTokenService(ServiceExtensionContext cont
return new EmbeddedSecureTokenService(new TokenGenerationServiceImpl(keyPair.getPrivate()), clock, TimeUnit.MINUTES.toSeconds(tokenExpiration));
}

@Provider(isDefault = true)
public TrustedIssuerRegistry createInMemoryIssuerRegistry() {
return new DefaultTrustedIssuerRegistry();
}

private KeyPair keyPairFromConfig(ServiceExtensionContext context) {
var pubKeyAlias = context.getSetting(STS_PUBLIC_KEY_ALIAS, null);
var privKeyAlias = context.getSetting(STS_PRIVATE_KEY_ALIAS, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public String name() {
return NAME;
}

@Provider(isDefault = true)
@Provider
public StsClientTokenGeneratorService clientTokenService(ServiceExtensionContext context) {
var tokenExpiration = context.getSetting(STS_TOKEN_EXPIRATION, DEFAULT_STS_TOKEN_EXPIRATION_MIN);
return new StsClientTokenGeneratorServiceImpl(
Expand All @@ -72,7 +72,7 @@ public StsClientTokenGeneratorService clientTokenService(ServiceExtensionContext
TimeUnit.MINUTES.toSeconds(tokenExpiration));
}

@Provider(isDefault = true)
@Provider
public StsClientService clientService() {
return new StsClientServiceImpl(clientStore, vault, transactionContext);
}
Expand Down

0 comments on commit 76e1e74

Please sign in to comment.