Skip to content

Commit

Permalink
- extract security service endpoint as config value to be provided on…
Browse files Browse the repository at this point in the history
… deploy
  • Loading branch information
doggerz committed Apr 21, 2024
1 parent a0748e8 commit f62972a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import earth.angelson.security.AuthorizationInterceptor;
import earth.angelson.security.cache.TokenCacheService;
import com.github.benmanes.caffeine.cache.Caffeine;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.caffeine.CaffeineCacheManager;
Expand All @@ -15,9 +16,13 @@
@Configuration
public class SecurityConfiguration {


@Value("${security.service.url:http:https://localhost:8081/account/info}")
private String securityServiceUrl;

@Bean
public TokenCacheService tokenCacheService() {
return new TokenCacheService("http:https://localhost:8081/account/info");
return new TokenCacheService(securityServiceUrl);
}

@Bean
Expand Down

0 comments on commit f62972a

Please sign in to comment.