Class BasicExpiringJWTSharedSecretCredentialFactoryBean

java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
net.shibboleth.ext.spring.factory.AbstractComponentAwareFactoryBean<T>
net.shibboleth.idp.profile.spring.factory.AbstractCredentialFactoryBean<ExpiringJWKCredential>
net.shibboleth.oidc.security.credential.BasicExpiringJWTSharedSecretCredentialFactoryBean
All Implemented Interfaces:
Aware, BeanClassLoaderAware, BeanFactoryAware, DisposableBean, FactoryBean<ExpiringJWKCredential>, InitializingBean

public class BasicExpiringJWTSharedSecretCredentialFactoryBean extends AbstractCredentialFactoryBean<ExpiringJWKCredential>
A factory bean for creating a BasicExpiringJWKCredential from an injected secret.
Since:
2.2.0
  • Field Details

    • secret

      @Nullable private String secret
      The secret to use when creating a BasicJWKCredential.
    • jcaAlg

      @Nullable private String jcaAlg
      The JCA algorithm to set on the SecretKey. Defaults to AES.
    • alg

      @Nullable private com.nimbusds.jose.Algorithm alg
      The key management algorithm ('alg') this credential supports.
    • credentialExpiresAt

      @Nonnull private Duration credentialExpiresAt
      When the credential expires in seconds since 1970-01-01T0:0:0Z. 0 seconds represents no expiry. Defaults to 0.
  • Constructor Details

    • BasicExpiringJWTSharedSecretCredentialFactoryBean

      public BasicExpiringJWTSharedSecretCredentialFactoryBean()
      Constructor.
  • Method Details

    • setCredentialExpiresAt

      public void setCredentialExpiresAt(@Nonnull Duration expiresAt)
      Set the expiry in seconds since 1970-01-01T0:0:0Z.
      Parameters:
      expiresAt - the expiry.
    • setJcaAlg

      public void setJcaAlg(@Nullable String javaAlg)
      Set the JCA Algorithm to associate with this credential.
      Parameters:
      javaAlg - the jca algorithm.
    • setAlg

      public void setAlg(@Nonnull com.nimbusds.jose.Algorithm algorithm)
      Set the algorithm 'alg' associated with this credential.
      Parameters:
      algorithm - the algorithm.
    • setSecret

      public void setSecret(@Nonnull @NotEmpty String secretIn)
      Set the secret to use.
      Parameters:
      secretIn - the secret
    • doCreateInstance

      protected ExpiringJWKCredential doCreateInstance() throws Exception
      Specified by:
      doCreateInstance in class net.shibboleth.ext.spring.factory.AbstractComponentAwareFactoryBean<ExpiringJWKCredential>
      Throws:
      Exception
    • getObjectType

      public Class<?> getObjectType()
      Specified by:
      getObjectType in interface FactoryBean<ExpiringJWKCredential>
      Specified by:
      getObjectType in class AbstractFactoryBean<ExpiringJWKCredential>