feat: move competition setting to ffsaf site
This commit is contained in:
@@ -2,6 +2,7 @@ package fr.titionfire;
|
||||
|
||||
import io.quarkus.oidc.IdToken;
|
||||
import io.quarkus.oidc.RefreshToken;
|
||||
import io.quarkus.oidc.UserInfo;
|
||||
import io.quarkus.security.identity.SecurityIdentity;
|
||||
import jakarta.inject.Inject;
|
||||
import jakarta.ws.rs.GET;
|
||||
@@ -30,6 +31,9 @@ public class ExampleResource {
|
||||
@IdToken
|
||||
JsonWebToken idToken;
|
||||
|
||||
@Inject
|
||||
UserInfo userInfo;
|
||||
|
||||
/**
|
||||
* Injection point for the Access Token issued by the OpenID Connect Provider
|
||||
*/
|
||||
@@ -59,7 +63,8 @@ public class ExampleResource {
|
||||
.append("<body>")
|
||||
.append("<ul>");
|
||||
|
||||
|
||||
System.out.println(idToken);
|
||||
System.out.println(accessToken);
|
||||
Object userName = this.idToken.getClaim("preferred_username");
|
||||
|
||||
if (userName != null) {
|
||||
@@ -69,25 +74,17 @@ public class ExampleResource {
|
||||
response.append("<li>username: ").append(this.idToken.toString()).append("</li>");
|
||||
}
|
||||
|
||||
Object scopes = this.accessToken.getClaim("scope");
|
||||
/*Object scopes = this.accessToken.getClaim("scope");
|
||||
|
||||
if (scopes != null) {
|
||||
response.append("<li>scopes: ").append(scopes.toString()).append("</li>");
|
||||
}
|
||||
|
||||
if (scopes != null) {
|
||||
response.append("<li>scopes: ").append(this.accessToken.toString()).append("</li>");
|
||||
}
|
||||
response.append("<li>scopes: ").append(this.accessToken.toString()).append("</li>");
|
||||
response.append("<li>scopes: ").append(this.accessToken.getClaim("user_groups").toString()).append("</li>");*/
|
||||
|
||||
|
||||
if (scopes != null) {
|
||||
response.append("<li>scopes: ").append(this.accessToken.getClaim("user_groups").toString()).append("</li>");
|
||||
}
|
||||
|
||||
if (scopes != null) {
|
||||
response.append("<li>getRoles: ").append(this.securityIdentity.getRoles()).append("</li>");
|
||||
}
|
||||
|
||||
response.append("<li>getRoles: ").append(this.securityIdentity.getRoles()).append("</li>");
|
||||
response.append("<li>refresh_token: ").append(refreshToken.getToken() != null).append("</li>");
|
||||
|
||||
return response.append("</ul>").append("</body>").append("</html>").toString();
|
||||
|
||||
Reference in New Issue
Block a user