Class TestCredentialHelper
- java.lang.Object
-
- net.shibboleth.idp.plugin.authn.oidc.rp.impl.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 net.shibboleth.oidc.security.credential.JWKCredentialcreateAsymmetricSigningCredential(com.nimbusds.jose.jwk.AsymmetricJWK key)Create an asymmetric signing credential.static net.shibboleth.oidc.security.credential.ClientSecretCredentialcreateClientSecretCredential(String secret)Create a simple symmetric key client_secret credential from from the given shared secret.static net.shibboleth.oidc.security.credential.JWKCredentialcreateDirectEncryptionCredentialFromSharedSecret(String secret)Create a direct encryptionJWKCredentialfrom the given shared secret.static net.shibboleth.oidc.security.credential.JWKCredentialcreateKeyAgreementCredential(com.nimbusds.jose.jwk.ECKey secret)Create a key agreement encryptionJWKCredentialfrom the given EC key.static net.shibboleth.oidc.security.credential.JWKCredentialcreateKeyEncryptionCredential(com.nimbusds.jose.jwk.RSAKey secret)Create a key encryptionJWKCredentialfrom the given RSA key.
-
-
-
Method Detail
-
createClientSecretCredential
public static net.shibboleth.oidc.security.credential.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 net.shibboleth.oidc.security.credential.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 net.shibboleth.oidc.security.credential.JWKCredential createAsymmetricSigningCredential(com.nimbusds.jose.jwk.AsymmetricJWK key) throws com.nimbusds.jose.JOSEExceptionCreate 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 net.shibboleth.oidc.security.credential.JWKCredential createKeyEncryptionCredential(com.nimbusds.jose.jwk.RSAKey secret) throws com.nimbusds.jose.JOSEExceptionCreate 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 net.shibboleth.oidc.security.credential.JWKCredential createKeyAgreementCredential(com.nimbusds.jose.jwk.ECKey secret) throws com.nimbusds.jose.JOSEExceptionCreate 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
-
-