[java-oidc-common] branch main updated: Fix use of more than one Charset type

Codeberg noreply at shibboleth.net
Wed Feb 25 09:31:30 UTC 2026


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

codeberg pushed a commit to branch main
in repository java-oidc-common.

View the commit online:
https://codeberg.org/Shibboleth/java-oidc-common/commit/3c484c9fcf54855366bce8da1d49770838bcffd6

The following commit(s) were added to refs/heads/main by this push:
     new 3c484c9f Fix use of more than one Charset type
3c484c9f is described below

commit 3c484c9fcf54855366bce8da1d49770838bcffd6
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Wed Feb 25 09:31:22 2026 +0000

    Fix use of more than one Charset type
    
     - add overrides
---
 .../oidc/security/credential/DefaultClientSecretCredential.java    | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/oidc-common-crypto-api/src/main/java/net/shibboleth/oidc/security/credential/DefaultClientSecretCredential.java b/oidc-common-crypto-api/src/main/java/net/shibboleth/oidc/security/credential/DefaultClientSecretCredential.java
index 97db57b6..aa23e72f 100644
--- a/oidc-common-crypto-api/src/main/java/net/shibboleth/oidc/security/credential/DefaultClientSecretCredential.java
+++ b/oidc-common-crypto-api/src/main/java/net/shibboleth/oidc/security/credential/DefaultClientSecretCredential.java
@@ -26,7 +26,6 @@ import org.opensaml.security.credential.UsageType;
 import com.nimbusds.jose.EncryptionMethod;
 import com.nimbusds.jose.JOSEException;
 import com.nimbusds.jose.JWEAlgorithm;
-import com.nimbusds.jose.util.StandardCharset;
 
 import net.shibboleth.shared.annotation.constraint.NotEmpty;
 import net.shibboleth.shared.annotation.constraint.NotLive;
@@ -68,23 +67,26 @@ public class DefaultClientSecretCredential implements ClientSecretCredential {
      */
     public DefaultClientSecretCredential(@Nonnull final String secret, @Nonnull final String keyName) {
         Constraint.isNotEmpty(secret, "Secret can not be null or empty");
-        final byte[] bytes = secret.getBytes(StandardCharset.UTF_8);
+        final byte[] bytes = secret.getBytes(StandardCharsets.UTF_8);
         assert bytes != null;
         clientSecret = bytes;
         secretKeyName = Constraint.isNotEmpty(keyName, "Secret keyname can not be null or empty");
     }
     
     /** {@inheritDoc} */
+    @Override
     @Nonnull public String getSecret() {
         return new String(clientSecret, StandardCharsets.UTF_8);
     }
     
     /** {@inheritDoc} */
+    @Override
     @NotLive @Nonnull public byte[] getSecretAsBytes(){
         return clientSecret.clone();
     }
 
     /** {@inheritDoc} */
+    @Override
     @Nonnull public JWKCredential toSigningCredential() {
         final BasicExpiringJWKCredential jwkCredential = new BasicExpiringJWKCredential();  
         jwkCredential.getKeyNames().add(secretKeyName);
@@ -95,6 +97,7 @@ public class DefaultClientSecretCredential implements ClientSecretCredential {
     }
 
     /** {@inheritDoc} */
+    @Override
     @Nonnull public JWKCredential toEncryptionCredential(@Nonnull final JWEAlgorithm alg,
             @Nonnull final EncryptionMethod enc) throws JOSEException {
         // Derive key using the algorithm and enc method

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


More information about the commits mailing list