JAX-RS extension
JAX-RS Extension help to define the certificate alias rest client will use
To enable this we need to include the next dependency on the application
<dependency>
<groupId>fish.payara.ecosystem.jaxrs</groupId>
<artifactId>rest-ssl-configuration</artifactId>
<version>1.0</version>
</dependency>
Also it is needed to specify the next property for Rest Client call
Property | Payara Public API constant | Description |
---|---|---|
|
|
The alias name of the certificate |
The name of the property is defined as a constant in the fish.payara.security.client.PayaraConstants class.
|
Example
ClientBuilder.newBuilder()
.property(PayaraConstants.JAXRS_CLIENT_CERTIFICATE_ALIAS, "someAliasName")
.build()
.target(new URI("https://localhost:8080/service"))
.request().get(Service.class)
For this to work, you need to include the certificate with the given alias in the default payara keystore. |