Class TestCredentialHelper
- java.lang.Object
-
- net.shibboleth.oidc.security.impl.support.TestCredentialHelper
-
public final class TestCredentialHelper extends Object
Helper that creates different credentials.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateTestCredentialHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JWKCredentialcreateAsymmetricSigningCredential(com.nimbusds.jose.jwk.AsymmetricJWK key)Create an asymmetric signing credential.static ClientSecretCredentialcreateClientSecretCredential(String secret)Create a simple symmetric key client_secret credential from from the given shared secret.static JWKCredentialcreateDirectEncryptionCredentialFromSharedSecret(String secret)Create a direct encryptionJWKCredentialfrom the given shared secret.static JWKCredentialcreateKeyAgreementCredential(com.nimbusds.jose.jwk.ECKey secret)Create a key agreement encryptionJWKCredentialfrom the given EC key.static JWKCredentialcreateKeyEncryptionCredential(com.nimbusds.jose.jwk.RSAKey secret)Create a key encryptionJWKCredentialfrom the given RSA key.
-
-
-
Method Detail
-
createClientSecretCredential
public static ClientSecretCredential createClientSecretCredential(String secret) throws KeyException
Create a simple symmetric key client_secret credential from from the given shared secret.- Parameters:
secret- the client secret- Returns:
- the credential
- Throws:
KeyException- on error creating the key
-
createDirectEncryptionCredentialFromSharedSecret
public static JWKCredential createDirectEncryptionCredentialFromSharedSecret(String secret) throws KeyException
Create a direct encryptionJWKCredentialfrom the given shared secret.- Parameters:
secret- the secret to convert to aJWKCredential.- Returns:
- the credential
- Throws:
KeyException- on error creating the key
-
createAsymmetricSigningCredential
public static JWKCredential createAsymmetricSigningCredential(com.nimbusds.jose.jwk.AsymmetricJWK key) throws com.nimbusds.jose.JOSEException
Create an asymmetric signing credential.- Parameters:
key- the key to convert to aJWKCredential.- Returns:
- the credential
- Throws:
com.nimbusds.jose.JOSEException- on error
-
createKeyEncryptionCredential
public static JWKCredential createKeyEncryptionCredential(com.nimbusds.jose.jwk.RSAKey secret) throws com.nimbusds.jose.JOSEException
Create a key encryptionJWKCredentialfrom the given RSA key.- Parameters:
secret- the RSAKey to convert to aJWKCredential.- Returns:
- the credential
- Throws:
com.nimbusds.jose.JOSEException- on error
-
createKeyAgreementCredential
public static JWKCredential createKeyAgreementCredential(com.nimbusds.jose.jwk.ECKey secret) throws com.nimbusds.jose.JOSEException
Create a key agreement encryptionJWKCredentialfrom the given EC key.- Parameters:
secret- the ECKey to convert to aJWKCredential.- Returns:
- the credential
- Throws:
com.nimbusds.jose.JOSEException- on error
-
-