-
Notifications
You must be signed in to change notification settings - Fork 21
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 #108 from Sgitario/fix_oidc_module
Enable tests to cover access token (new oidc token propagation module)
- Loading branch information
Showing
6 changed files
with
67 additions
and
14 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
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
35 changes: 32 additions & 3 deletions
35
...-oidc-restclient/src/main/java/io/quarkus/qe/ping/clients/TokenPropagationPongClient.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,20 +1,49 @@ | ||
package io.quarkus.qe.ping.clients; | ||
|
||
import javax.ws.rs.Consumes; | ||
import javax.ws.rs.DELETE; | ||
import javax.ws.rs.GET; | ||
import javax.ws.rs.POST; | ||
import javax.ws.rs.PUT; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.PathParam; | ||
import javax.ws.rs.Produces; | ||
import javax.ws.rs.core.MediaType; | ||
|
||
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; | ||
|
||
import io.quarkus.oidc.token.propagation.AccessToken; | ||
import io.quarkus.qe.model.Score; | ||
|
||
@RegisterRestClient | ||
// TODO: Can't use both OIDC Client Filter and OIDC Token extensions. Reported in https://github.com/quarkusio/quarkus/issues/14466 | ||
//@AccessToken | ||
@AccessToken | ||
@Path("/rest-pong") | ||
public interface TokenPropagationPongClient { | ||
|
||
@GET | ||
@Path("/rest-pong") | ||
@Produces(MediaType.TEXT_PLAIN) | ||
String getPong(); | ||
|
||
@GET | ||
@Path("/name/{name}") | ||
@Produces(MediaType.TEXT_PLAIN) | ||
String getPongWithPathName(@PathParam("name") String name); | ||
|
||
@POST | ||
@Path("/withBody") | ||
@Produces(MediaType.TEXT_PLAIN) | ||
@Consumes(MediaType.APPLICATION_JSON) | ||
String createPongWithBody(Score score); | ||
|
||
@PUT | ||
@Path("/withBody") | ||
@Produces(MediaType.TEXT_PLAIN) | ||
@Consumes(MediaType.APPLICATION_JSON) | ||
String updatePongWithBody(Score score); | ||
|
||
@DELETE | ||
@Path("/{id}") | ||
@Produces(MediaType.TEXT_PLAIN) | ||
boolean deletePongById(@PathParam("id") String id); | ||
|
||
} |
3 changes: 0 additions & 3 deletions
3
...oidc-restclient/src/test/java/io/quarkus/qe/NativeTokenPropagationPingPongResourceIT.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,10 +1,7 @@ | ||
package io.quarkus.qe; | ||
|
||
import org.junit.jupiter.api.Disabled; | ||
|
||
import io.quarkus.test.junit.NativeImageTest; | ||
|
||
@Disabled("TODO: Can't use both OIDC Client Filter and OIDC Token extensions. Reported in https://github.com/quarkusio/quarkus/issues/14466") | ||
@NativeImageTest | ||
public class NativeTokenPropagationPingPongResourceIT extends TokenPropagationPingPongResourceTest { | ||
} |
3 changes: 0 additions & 3 deletions
3
...kus-oidc-restclient/src/test/java/io/quarkus/qe/TokenPropagationPingPongResourceTest.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