Skip to content

Commit

Permalink
fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
sdelamo committed Jun 2, 2023
1 parent 030dca7 commit 14ae00d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import io.micronaut.http.annotation.Get
import io.micronaut.http.client.HttpClient
import io.micronaut.http.client.annotation.Client
import io.micronaut.http.client.exceptions.HttpClientResponseException
import io.micronaut.http.filter.OncePerRequestHttpServerFilter
import io.micronaut.http.filter.HttpServerFilter
import io.micronaut.http.filter.ServerFilterChain
import io.micronaut.http.server.exceptions.ExceptionHandler
import io.micronaut.test.extensions.spock.annotation.MicronautTest
Expand Down Expand Up @@ -98,10 +98,9 @@ class JettyExceptionHandlerSpec extends Specification {
@Singleton
@Filter("/**")
@Requires(property = "spec.name", value = "JettyExceptionHandlerSpec")
static class MyFilter extends OncePerRequestHttpServerFilter {

static class MyFilter implements HttpServerFilter {
@Override
protected Publisher<MutableHttpResponse<?>> doFilterOnce(HttpRequest<?> request, ServerFilterChain chain) {
Publisher<MutableHttpResponse<?>> doFilter(HttpRequest<?> request, ServerFilterChain chain) {
if (!request.getAttribute(HttpAttributes.ROUTE_MATCH).isPresent()) {
return Publishers.just(new Unauthorized())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ class JettyPrincipalBindingSpec extends Specification {

@Requires(property = 'spec.name', value = 'JettyPrincipalBindingSpec')
@Singleton
static class AuthenticationProviderUserPassword implements AuthenticationProvider {
static class AuthenticationProviderUserPassword<T> implements AuthenticationProvider<T> {
@Override
Publisher<AuthenticationResponse> authenticate(HttpRequest<?> httpRequest, AuthenticationRequest<?, ?> authenticationRequest) {
Publisher<AuthenticationResponse> authenticate(T httpRequest, AuthenticationRequest<?, ?> authenticationRequest) {
Mono.create({ MonoSink emitter ->
String identity = authenticationRequest.identity
if (identity == 'sherlock' && authenticationRequest.secret == 'password') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ class TomcatPrincipalBindingSpec extends Specification {

@Requires(property = 'spec.name', value = 'TomcatPrincipalBindingSpec')
@Singleton
static class AuthenticationProviderUserPassword implements AuthenticationProvider {
static class AuthenticationProviderUserPassword<T> implements AuthenticationProvider<T> {
@Override
Publisher<AuthenticationResponse> authenticate(HttpRequest<?> httpRequest, AuthenticationRequest<?, ?> authenticationRequest) {
Publisher<AuthenticationResponse> authenticate(T httpRequest, AuthenticationRequest<?, ?> authenticationRequest) {
Mono.create({ MonoSink emitter ->
String identity = authenticationRequest.identity
if (identity == 'sherlock' && authenticationRequest.secret == 'password') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ class UndertowPrincipalBindingSpec extends Specification {

@Requires(property = 'spec.name', value = 'UndertowPrincipalBindingSpec')
@Singleton
static class AuthenticationProviderUserPassword implements AuthenticationProvider {
static class AuthenticationProviderUserPassword<T> implements AuthenticationProvider<T> {
@Override
Publisher<AuthenticationResponse> authenticate(HttpRequest<?> httpRequest, AuthenticationRequest<?, ?> authenticationRequest) {
Publisher<AuthenticationResponse> authenticate(T httpRequest, AuthenticationRequest<?, ?> authenticationRequest) {
Mono.create({ MonoSink emitter ->
String identity = authenticationRequest.identity
if (identity == 'sherlock' && authenticationRequest.secret == 'password') {
Expand Down

0 comments on commit 14ae00d

Please sign in to comment.