package fr.titionfire; import io.quarkus.oidc.IdToken; import io.quarkus.oidc.RefreshToken; import io.quarkus.security.identity.SecurityIdentity; import jakarta.inject.Inject; import jakarta.ws.rs.GET; import jakarta.ws.rs.Path; import jakarta.ws.rs.Produces; import org.eclipse.microprofile.jwt.JsonWebToken; import org.jboss.resteasy.reactive.NoCache; @Path("/hello") public class ExampleResource { /*@Inject @IdToken JsonWebToken idToken; @GET @Produces(MediaType.TEXT_PLAIN) public String hello() { return "Hello, " + idToken.getClaim("name"); }*/ /** * Injection point for the ID Token issued by the OpenID Connect Provider */ @Inject @IdToken JsonWebToken idToken; /** * Injection point for the Access Token issued by the OpenID Connect Provider */ @Inject JsonWebToken accessToken; /** * Injection point for the Refresh Token issued by the OpenID Connect Provider */ @Inject RefreshToken refreshToken; @Inject SecurityIdentity securityIdentity; /** * Returns the tokens available to the application. This endpoint exists only for demonstration purposes, you should not * expose these tokens in a real application. * * @return a HTML page containing the tokens available to the application */ @GET @Produces("text/html") @NoCache public String getTokens() { StringBuilder response = new StringBuilder().append("") .append("") .append("").append("").append("").toString(); } }