[java-idp-plugin-vci] 01/02: AuthorizeCodeClaimsSet not stored to Token context anymore
Codeberg
noreply at shibboleth.net
Wed Dec 3 15:16:07 UTC 2025
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch main
in repository java-idp-plugin-vci.
View the commit online:
https://codeberg.org/Shibboleth/java-idp-plugin-vci/commit/fb4730d43961f0234df22f82e0e8d637274664b6
commit fb4730d43961f0234df22f82e0e8d637274664b6
Author: jlauros <janne.lauros at csc.fi>
AuthorDate: Wed Dec 3 17:14:23 2025 +0200
AuthorizeCodeClaimsSet not stored to Token context anymore
---
.../plugin/openidvci/messaging/context/TokenContext.java | 13 -------------
.../profile/impl/FormOutboundTokenResponseMessage.java | 16 +++++++++-------
2 files changed, 9 insertions(+), 20 deletions(-)
diff --git a/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/messaging/context/TokenContext.java b/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/messaging/context/TokenContext.java
index c0dc7c1..5394cfe 100644
--- a/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/messaging/context/TokenContext.java
+++ b/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/messaging/context/TokenContext.java
@@ -26,7 +26,6 @@ import org.opensaml.messaging.context.BaseContext;
import com.nimbusds.openid.connect.sdk.claims.ClaimsSet;
-import net.shibboleth.idp.plugin.oidc.op.token.support.AuthorizeCodeClaimsSet;
/**
* Subcontext for /token - end point. This context appears as a subcontext of
@@ -34,9 +33,6 @@ import net.shibboleth.idp.plugin.oidc.op.token.support.AuthorizeCodeClaimsSet;
*/
public class TokenContext extends BaseContext {
- @Nullable
- private AuthorizeCodeClaimsSet authorizeCodeClaimsSet;
-
@Nullable
private CredentialOfferObject credentialOfferObject;
@@ -46,15 +42,6 @@ public class TokenContext extends BaseContext {
@Nullable
private List<OpenIDVCIAuthorizationDetail> responseAuthorizationDetails;
- @Nullable
- public AuthorizeCodeClaimsSet getAuthorizeCodeClaimsSet() {
- return authorizeCodeClaimsSet;
- }
-
- public void setAuthorizeCodeClaimsSet(@Nullable AuthorizeCodeClaimsSet authorizeCodeClaimsSet) {
- this.authorizeCodeClaimsSet = authorizeCodeClaimsSet;
- }
-
@Nullable
public CredentialOfferObject getCredentialOfferObject() {
return credentialOfferObject;
diff --git a/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/FormOutboundTokenResponseMessage.java b/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/FormOutboundTokenResponseMessage.java
index dcc7d53..73c8133 100644
--- a/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/FormOutboundTokenResponseMessage.java
+++ b/openid-vci-impl/src/main/java/org/geant/shibboleth/plugin/openidvci/profile/impl/FormOutboundTokenResponseMessage.java
@@ -30,6 +30,8 @@ import javax.annotation.Nullable;
import org.geant.shibboleth.plugin.openidvci.config.OpenIDVCIConfiguration;
import org.geant.shibboleth.plugin.openidvci.messaging.context.TokenContext;
import org.geant.shibboleth.plugin.openidvci.messaging.context.navigate.AuthorizationDetailsLookupFunction;
+import org.geant.shibboleth.plugin.openidvci.messaging.impl.AbstractOpenIDVCITokenRequestAction;
+import org.geant.shibboleth.plugin.openidvci.messaging.impl.AbstractOpenIDVCITokenResponseAction;
import org.geant.shibboleth.plugin.openidvci.messaging.impl.OpenIDVCIAuthorizationDetail;
import org.geant.shibboleth.plugin.openidvci.messaging.impl.OpenIDVCITokenRequest;
import org.geant.shibboleth.plugin.openidvci.storage.CredentialOfferObject;
@@ -67,7 +69,7 @@ import net.shibboleth.shared.security.impl.SecureRandomIdentifierGenerationStrat
* type. Token has no user identifying information like principal, for now. It
* would need to come as part of credential offer request to be populated here.
*/
-public class FormOutboundTokenResponseMessage extends AbstractProfileAction {
+public class FormOutboundTokenResponseMessage extends AbstractOpenIDVCITokenResponseAction {
/** Class logger. */
@Nonnull
@@ -235,16 +237,16 @@ public class FormOutboundTokenResponseMessage extends AbstractProfileAction {
.setSubject(credentialOffer.serialize()).setScope(new Scope("openid"))
.setDlClaimsUI(tokenContext.getPotentialCredentials())
.setExpiresAt(Instant.now().plus(accessTokenLifetime)).build();
- } else if (tokenContext.getAuthorizeCodeClaimsSet() != null) {
+ } else if (getOidcResponseContext().getAuthorizationGrantClaimsSet() != null) {
// TODO: Set proper access token values!
claimsSet = new AccessTokenClaimsSet.Builder()
.setIssuer(issuerLookupStrategy.apply(profileRequestContext))
- .setClientID(tokenContext.getAuthorizeCodeClaimsSet().getClientID()).setJWTID(idGenerator)
+ .setClientID(getOidcResponseContext().getAuthorizationGrantClaimsSet().getClientID()).setJWTID(idGenerator)
.setIssuedAt(Instant.now()).setAuthenticationTime(Instant.now())
- .setPrincipal(tokenContext.getAuthorizeCodeClaimsSet().getPrincipal())
- .setSubject(tokenContext.getAuthorizeCodeClaimsSet().getSubject()).setScope(new Scope("openid"))
- .setDlClaims(tokenContext.getAuthorizeCodeClaimsSet().getDeliveryClaims())
- .setDlClaimsUI(tokenContext.getAuthorizeCodeClaimsSet().getUserinfoDeliveryClaims())
+ .setPrincipal(getOidcResponseContext().getAuthorizationGrantClaimsSet().getPrincipal())
+ .setSubject(getOidcResponseContext().getAuthorizationGrantClaimsSet().getSubject()).setScope(new Scope("openid"))
+ .setDlClaims(getOidcResponseContext().getAuthorizationGrantClaimsSet().getDeliveryClaims())
+ .setDlClaimsUI(getOidcResponseContext().getAuthorizationGrantClaimsSet().getUserinfoDeliveryClaims())
.setExpiresAt(Instant.now().plus(accessTokenLifetime)).build();
}
// it should be one or the other!
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list