[java-idp-plugin-oidc-rp] branch main updated: Return self references from contexts where missing

Phil Smart philip.smart at jisc.ac.uk
Wed Mar 15 11:34:01 UTC 2023


This is an automated email from the git hooks/post-receive script.

philsmart pushed a commit to branch main
in repository java-idp-plugin-oidc-rp.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-plugin-oidc-rp.git;a=commit;h=08f1f12398d3c7c03cde22d7e0fee3a372356807

The following commit(s) were added to refs/heads/main by this push:
     new 08f1f12  Return self references from contexts where missing
08f1f12 is described below

commit 08f1f12398d3c7c03cde22d7e0fee3a372356807
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Wed Mar 15 11:33:56 2023 +0000

    Return self references from contexts where missing
---
 .../authn/oidc/rp/context/AbstractAuthenticatableOIDCContext.java    | 5 ++++-
 .../idp/plugin/authn/oidc/rp/context/AbstractOIDCEntityContext.java  | 5 ++++-
 .../idp/plugin/authn/oidc/rp/context/AccessTokenResponseContext.java | 5 ++++-
 .../idp/plugin/authn/oidc/rp/context/EndUserClaimsContext.java       | 5 ++++-
 .../plugin/authn/oidc/rp/context/OutboundMessageHandlerContext.java  | 5 ++++-
 .../idp/plugin/authn/oidc/rp/context/UserInfoResponseContext.java    | 5 ++++-
 6 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/AbstractAuthenticatableOIDCContext.java b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/AbstractAuthenticatableOIDCContext.java
index 4e95c02..6f2641a 100644
--- a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/AbstractAuthenticatableOIDCContext.java
+++ b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/AbstractAuthenticatableOIDCContext.java
@@ -41,9 +41,12 @@ public class AbstractAuthenticatableOIDCContext extends BaseContext {
      * Sets the flag indicating whether the information contained in this context has been authenticated.
      * 
      * @param flag The flag to set.
+     * 
+     * @return this
      */
-    public void setAuthenticated(final boolean flag) {
+    public AbstractAuthenticatableOIDCContext setAuthenticated(final boolean flag) {
         authenticated = flag;
+        return this;
     }
 
 }
diff --git a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/AbstractOIDCEntityContext.java b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/AbstractOIDCEntityContext.java
index b58453f..062fef0 100644
--- a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/AbstractOIDCEntityContext.java
+++ b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/AbstractOIDCEntityContext.java
@@ -47,9 +47,12 @@ public class AbstractOIDCEntityContext extends BaseContext {
      * Sets the identifier of the OIDC entity e.g. issuerId or ClientId.
      * 
      * @param id the new identifier
+     * 
+     * @return this
      */
-    public void setIdentifier(@Nullable final String id) {
+    public AbstractOIDCEntityContext setIdentifier(@Nullable final String id) {
         identifer = StringSupport.trimOrNull(id);
+        return this;
     }
 
 }
diff --git a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/AccessTokenResponseContext.java b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/AccessTokenResponseContext.java
index 15586f1..d1198d1 100644
--- a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/AccessTokenResponseContext.java
+++ b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/AccessTokenResponseContext.java
@@ -42,10 +42,13 @@ public class AccessTokenResponseContext extends AbstractAuthenticatableOIDCConte
      * Set the OAuth 2.0 and OIDC Token Response.
      * 
      * @param token the token response
+     * 
+     * @return this
      */
-    public void setTokenResponse(@Nullable final OIDCTokenResponse token) {
+    public AccessTokenResponseContext setTokenResponse(@Nullable final OIDCTokenResponse token) {
         tokenResponse = token;
         tokenResponseCreatedAt = Instant.now();
+        return this;
     }
     
     /**
diff --git a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/EndUserClaimsContext.java b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/EndUserClaimsContext.java
index 098ae7c..7a4d135 100644
--- a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/EndUserClaimsContext.java
+++ b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/EndUserClaimsContext.java
@@ -68,9 +68,12 @@ public class EndUserClaimsContext extends BaseContext {
      * and not 'validation' claims.</p>
      *  
      * @param claims the id_token claims
+     * 
+     * @return this
      */
-    public void setUnprocessedIdTokenClaims(@Nonnull final JWTClaimsSet claims) {
+    public EndUserClaimsContext setUnprocessedIdTokenClaims(@Nonnull final JWTClaimsSet claims) {
         unprocessedIdTokenClaims = Constraint.isNotNull(claims,"ID Token claims can not be null");
+        return this;
     }
     
     /**
diff --git a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/OutboundMessageHandlerContext.java b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/OutboundMessageHandlerContext.java
index f39269e..451dc67 100644
--- a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/OutboundMessageHandlerContext.java
+++ b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/OutboundMessageHandlerContext.java
@@ -52,9 +52,12 @@ public class OutboundMessageHandlerContext extends BaseContext {
      * Set the Spring Webflow execution key.
      *  
      * @param key the swf execution key
+     * 
+     * @return this
      */
-    public void setWebflowKey(@Nonnull final String key) {
+    public OutboundMessageHandlerContext setWebflowKey(@Nonnull final String key) {
         webflowKey = Constraint.isNotNull(key, "Spring Webflow Key can not be null");
+        return this;
     }
 
     /**
diff --git a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/UserInfoResponseContext.java b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/UserInfoResponseContext.java
index 8b3ef21..ab49dd1 100644
--- a/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/UserInfoResponseContext.java
+++ b/idp-oidc-rp-api/src/main/java/net/shibboleth/idp/plugin/authn/oidc/rp/context/UserInfoResponseContext.java
@@ -40,9 +40,12 @@ public class UserInfoResponseContext  extends AbstractAuthenticatableOIDCContext
      * Set the user info response.
      * 
      * @param info the user info response.
+     * 
+     * @return this
      */
-    public void setUserInfo(@Nullable final UserInfoSuccessResponse info) {
+    public UserInfoResponseContext setUserInfo(@Nullable final UserInfoSuccessResponse info) {
         userInfo = info;
+        return this;
     }
 
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list