Class AuthenticationMdcFilter
- java.lang.Object
-
- io.kokuwa.micronaut.logging.http.AbstractMdcFilter
-
- io.kokuwa.micronaut.logging.http.mdc.AuthenticationMdcFilter
-
- All Implemented Interfaces:
io.micronaut.core.order.Ordered,io.micronaut.http.filter.HttpFilter,io.micronaut.http.filter.HttpServerFilter
@Refreshable @Requires(classes=io.micronaut.security.authentication.Authentication.class) @Requires(property="logger.http.authentication.enabled",notEquals="false") @Filter("${logger.http.authentication.path:/**}") public class AuthenticationMdcFilter extends AbstractMdcFilterFilter to add claims from authentication to MDC.- Author:
- Stephan Schnabel
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_NAMEstatic intDEFAULT_ORDERstatic StringPREFIX-
Fields inherited from class io.kokuwa.micronaut.logging.http.AbstractMdcFilter
log, order, prefix
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>>doFilter(io.micronaut.http.HttpRequest<?> request, io.micronaut.http.filter.ServerFilterChain chain)-
Methods inherited from class io.kokuwa.micronaut.logging.http.AbstractMdcFilter
doFilter, getOrder
-
-
-
-
Field Detail
-
PREFIX
public static final String PREFIX
- See Also:
- Constant Field Values
-
DEFAULT_NAME
public static final String DEFAULT_NAME
- See Also:
- Constant Field Values
-
DEFAULT_ORDER
public static final int DEFAULT_ORDER
-
-
Constructor Detail
-
AuthenticationMdcFilter
public AuthenticationMdcFilter(@Value("${logger.http.authentication.name}") Optional<String> name, @Value("${logger.http.authentication.attributes}") Optional<Set<String>> attributes, @Value("${logger.http.authentication.prefix}") Optional<String> prefix, @Value("${logger.http.authentication.order}") Optional<Integer> order)
-
-