Class GatewayRoutesConfig
java.lang.Object
es.kukenan.smartfi.microservice.security.gateway.configuration.GatewayRoutesConfig
Configuration class for security gateway using spring cloud gateway.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AddContextHeaderFilterAdd Context Header Filter.private es.kukenan.smartfi.logger.WalletLoggerLogger.private static final StringMask to find in origin path.private static final StringValue of mask to replace in destination path.private GatewayRoutesPropertiesSecurity gateway properties.private es.kukenan.smartfi.common.context.RequestContextManagerTheRequestContextManagerused to update the server request context.(package private) ResponseHandlerComponent for response operations.(package private) SecurityGatewayPreFilterPre filter for api endpoints which includes authentication bearer header.private TransformExternalHeadersFilterTransform external header names to internal header names.(package private) WebExchangeSessionHandlerComponent for request operations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.cloud.gateway.route.RouteLocatorcustomRouteLocator(org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder builder) Build the gateway configuration for every endpoint.private GatewayRoutesProperties.ServiceloadServiceInfo(String serviceName) private org.springframework.cloud.gateway.route.builder.UriSpecsetFilters(org.springframework.cloud.gateway.route.builder.GatewayFilterSpec f, String serviceUri, String originPath, String destinationPath, boolean modifyRequest, boolean modifyResponse) Build the UriSpec given the endpoint information.
-
Field Details
-
MASK
Mask to find in origin path.- See Also:
-
MASK_VALUE
Value of mask to replace in destination path.- See Also:
-
responseHandler
Component for response operations. -
webExchangeSessionHandler
Component for request operations. -
securityGatewayPreFilter
Pre filter for api endpoints which includes authentication bearer header. -
log
private es.kukenan.smartfi.logger.WalletLogger logLogger. -
properties
Security gateway properties. -
requestContextManager
@Autowired private es.kukenan.smartfi.common.context.RequestContextManager requestContextManagerTheRequestContextManagerused to update the server request context. -
addContextHeaderFilter
Add Context Header Filter. -
transformExternalHeadersFilter
Transform external header names to internal header names.
-
-
Constructor Details
-
GatewayRoutesConfig
public GatewayRoutesConfig()
-
-
Method Details
-
setFilters
private org.springframework.cloud.gateway.route.builder.UriSpec setFilters(org.springframework.cloud.gateway.route.builder.GatewayFilterSpec f, String serviceUri, String originPath, String destinationPath, boolean modifyRequest, boolean modifyResponse) Build the UriSpec given the endpoint information.- Parameters:
f- Started GatewayFilterSpecserviceUri- Service Uri to sendoriginPath- Origin path useddestinationPath- Destination path to sendmodifyRequest- flag to add request body modification (decryption)modifyResponse- flag to add response body modification (encryption)- Returns:
- UriSpec generated with filters
-
customRouteLocator
@Bean public org.springframework.cloud.gateway.route.RouteLocator customRouteLocator(org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder builder) Build the gateway configuration for every endpoint.- Parameters:
builder- Builder for build specific routes in the gateway.- Returns:
- RouteLocator with all configuration for every endpoint needed.
-
loadServiceInfo
-