This file contains hidden or 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
| const token = pm.globals.get("token"); | |
| const tokenExpiresAt = pm.globals.get("token_expires_at"); | |
| // If token is null or expired | |
| if (!token || tokenExpiresAt < (new Date()).getTime()) { | |
| // Prepare a request to Keycloak for password grant | |
| const request = { | |
| url: pm.globals.get("sso_url"), | |
| method: 'POST', |
This file contains hidden or 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
| {"openapi":"3.0.3","info":{"title":"Api Documentation","description":"Api Documentation","termsOfService":"urn:tos","contact":{},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0"},"version":"1.0"},"tags":[{"name":"identity-account-api-controller","description":"Identity Account Api Controller"},{"name":"identity-token-api-controller","description":"Identity Token Api Controller"},{"name":"read-operation-handler","description":"Read Operation Handler"},{"name":"regon-api-controller","description":"Regon Api Controller"},{"name":"tenant-api-controller","description":"Tenant Api Controller"},{"name":"vies-api-controller","description":"Vies Api Controller"},{"name":"web-flux-links-handler","description":"Web Flux Links Handler"}],"paths":{"/api/identity/account":{"post":{"tags":["identity-account-api-controller"],"summary":"create","operationId":"createUsingPOST","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIdentityAccountRequest"}}}}, |
This file contains hidden or 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
| package pl.owlsy.drm; | |
| import com.google.common.primitives.Bytes; | |
| import lombok.RequiredArgsConstructor; | |
| import lombok.Value; | |
| import lombok.extern.slf4j.Slf4j; | |
| import java.awt.image.BufferedImage; | |
| import java.nio.charset.StandardCharsets; | |
| import java.util.ArrayList; |
This file contains hidden or 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
| import io.micronaut.core.async.publisher.Publishers; | |
| import io.micronaut.discovery.ServiceInstance; | |
| import io.micronaut.http.HttpRequest; | |
| import io.micronaut.http.HttpResponse; | |
| import io.micronaut.http.MutableHttpRequest; | |
| import io.micronaut.http.MutableHttpResponse; | |
| import io.micronaut.http.annotation.Filter; | |
| import io.micronaut.http.client.LoadBalancer; | |
| import io.micronaut.http.client.ProxyHttpClient; | |
| import io.micronaut.http.filter.OncePerRequestHttpServerFilter; |
This file contains hidden or 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
| import io.micronaut.context.annotation.Factory; | |
| import io.micronaut.http.client.LoadBalancer; | |
| import io.micronaut.http.client.loadbalance.DiscoveryClientLoadBalancerFactory; | |
| import javax.inject.Singleton; | |
| import java.util.Collections; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| import java.util.Set; |
This file contains hidden or 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
| gateway: | |
| services: | |
| - users-service | |
| - auth-service | |
| - info-service |
This file contains hidden or 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
| import io.micronaut.context.annotation.ConfigurationProperties; | |
| import lombok.Data; | |
| import java.util.Set; | |
| @Data | |
| @ConfigurationProperties("gateway") | |
| public class GatewayProperties { | |
| private Set<String> services; | |
| } |
This file contains hidden or 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
| package pl.owlsy.cache; | |
| import java.util.ArrayDeque; | |
| import java.util.Deque; | |
| import java.util.Map; | |
| import java.util.Optional; | |
| import java.util.concurrent.ConcurrentHashMap; | |
| public class LRUCache<K, V> implements Cache<K, V> { | |
| private final Map<K, V> cache; |
This file contains hidden or 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
| @Controller | |
| public class ForwardController { | |
| @GetMapping(value = {"/home", "/login", "/register", "/logout", "/..."}) | |
| public String frontend() { | |
| return "forward:/"; | |
| } | |
| } |
This file contains hidden or 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
| task buildFrontend(type: Exec) { | |
| if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) { | |
| commandLine 'cmd', '/c', 'cd src/main/frontend && npm run-script build && xcopy build\\* ..\\resources\\static\\ /Y /E ' | |
| } else { | |
| commandLine 'sh', '-c', 'cd src/main/frontend && npm run-script build && cp -r build/* ../resources/static/' | |
| } | |
| } | |
| build.dependsOn buildFrontend | |
| bootJar.dependsOn buildFrontend |
NewerOlder