Skip to content

Commit

Permalink
Merge pull request #1355 from sberyozkin/use_claims_enum
Browse files Browse the repository at this point in the history
Use Claims enum in security-openid-connect-web-authentication-quickstart
  • Loading branch information
rsvoboda authored Dec 6, 2023
2 parents b453cc1 + 61eb84d commit 9b48afa
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;

import org.eclipse.microprofile.jwt.Claims;
import org.eclipse.microprofile.jwt.JsonWebToken;

import io.quarkus.oidc.IdToken;
Expand Down Expand Up @@ -45,7 +46,7 @@ public String getTokens() {
.append("<body>")
.append("<ul>");

Object userName = this.idToken.getClaim("preferred_username");
Object userName = this.idToken.getClaim(Claims.preferred_username);

if (userName != null) {
response.append("<li>username: ").append(userName.toString()).append("</li>");
Expand Down

0 comments on commit 9b48afa

Please sign in to comment.