java.lang.Object
com.irurueta.authserver.serviceclient.infrastructure.resourceserver.SslRequestFactories

@Component public class SslRequestFactories extends Object
Builds the HTTP request factory that presents the client certificate: the one of the SSL bundle named by service-client.auth.ssl-bundle. It is used for the token endpoint and for the resource server, whose tokens may be bound to that certificate.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Settings of the service client at the authorization server.
    private final org.springframework.beans.factory.ObjectProvider<org.springframework.boot.ssl.SslBundles>
    The SSL bundles of the application, when SSL is configured at all.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<org.springframework.http.client.ClientHttpRequestFactory>
    Builds a request factory over the configured SSL bundle.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • properties

      private final ServiceClientAuthProperties properties
      Settings of the service client at the authorization server.
    • sslBundles

      private final org.springframework.beans.factory.ObjectProvider<org.springframework.boot.ssl.SslBundles> sslBundles
      The SSL bundles of the application, when SSL is configured at all.
  • Constructor Details

    • SslRequestFactories

      public SslRequestFactories()
  • Method Details

    • create

      public Optional<org.springframework.http.client.ClientHttpRequestFactory> create()
      Builds a request factory over the configured SSL bundle.
      Returns:
      the factory, or empty when no bundle is configured and the authentication method does not need one.
      Throws:
      IllegalStateException - if a mutual TLS method is configured without a bundle, or the bundle does not exist.