-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29940 from michalvavrik/feature/fix-oidc-client-f…
…ilter-reactive-reg-provider OIDC Client Reactive Filter - fix register provider with config property
- Loading branch information
Showing
10 changed files
with
87 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
16 changes: 16 additions & 0 deletions
16
...uarkus/oidc/client/filter/ProtectedResourceServiceCustomProviderConfigPropOidcClient.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package io.quarkus.oidc.client.filter; | ||
|
||
import javax.ws.rs.GET; | ||
import javax.ws.rs.Path; | ||
|
||
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; | ||
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; | ||
|
||
@RegisterProvider(OidcClientRequestFilter.class) | ||
@RegisterRestClient | ||
@Path("/") | ||
public interface ProtectedResourceServiceCustomProviderConfigPropOidcClient { | ||
|
||
@GET | ||
String getUserName(); | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
16 changes: 16 additions & 0 deletions
16
...dc/client/reactive/filter/ProtectedResourceServiceCustomProviderConfigPropOidcClient.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package io.quarkus.oidc.client.reactive.filter; | ||
|
||
import javax.ws.rs.GET; | ||
import javax.ws.rs.Path; | ||
|
||
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider; | ||
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; | ||
|
||
@RegisterProvider(OidcClientRequestReactiveFilter.class) | ||
@RegisterRestClient | ||
@Path("/") | ||
public interface ProtectedResourceServiceCustomProviderConfigPropOidcClient { | ||
|
||
@GET | ||
String getUserName(); | ||
} |
This file contains 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
11 changes: 11 additions & 0 deletions
11
...src/main/java/io/quarkus/oidc/client/reactive/filter/OidcClientRequestReactiveFilter.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
package io.quarkus.oidc.client.reactive.filter; | ||
|
||
import java.util.Optional; | ||
|
||
import javax.annotation.Priority; | ||
import javax.inject.Inject; | ||
import javax.ws.rs.Priorities; | ||
|
||
import io.quarkus.oidc.client.reactive.filter.runtime.AbstractOidcClientRequestReactiveFilter; | ||
import io.quarkus.oidc.client.reactive.filter.runtime.OidcClientReactiveFilterConfig; | ||
|
||
@Priority(Priorities.AUTHENTICATION) | ||
public class OidcClientRequestReactiveFilter extends AbstractOidcClientRequestReactiveFilter { | ||
|
||
@Inject | ||
OidcClientReactiveFilterConfig config; | ||
|
||
@Override | ||
protected Optional<String> clientId() { | ||
return config.clientName; | ||
} | ||
} |