You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 5, 2025. It is now read-only.
//Create an Authentication object with the access token
final Authentication auth = Authentication.builder()
.accessToken("9PQwQeiTLhcB8/W3/z2Lbw==")
.build();
//Create a Config object setting the Authentication object
final Config config = Config.builder()
.connectorType(ConnectorType.TPP_TOKEN)
.baseUrl("https://tpp.venafi.example")
.credentials(auth)
.build();
//Create the client with the Config object. The client will be authenticated
final VCertTknClient client = new VCertTknClient(config);
Error:
Exception in thread "main" com.venafi.vcert.sdk.VCertException: feign.FeignException$Unauthorized: status 401 reading TppToken#verifyToken(String)
at com.venafi.vcert.sdk.VCertException.fromFeignException(VCertException.java:57)
at com.venafi.vcert.sdk.connectors.tpp.TppTokenConnector.verifyAccessToken(TppTokenConnector.java:98)
at com.venafi.vcert.sdk.connectors.tpp.TppTokenConnector.authorize(TppTokenConnector.java:70)
at com.venafi.vcert.sdk.connectors.Connector.authenticate(Connector.java:78)
at com.venafi.vcert.sdk.VCertClient.(VCertClient.java:40)
at com.venafi.vcert.sdk.VCertTknClient.(VCertTknClient.java:17)
at org.example.VenafiTest.main(VenafiTest.java:35)
Caused by: feign.FeignException$Unauthorized: status 401 reading TppToken#verifyToken(String)
at feign.FeignException.clientErrorStatus(FeignException.java:161)
at feign.FeignException.errorStatus(FeignException.java:141)
at feign.FeignException.errorStatus(FeignException.java:133)
at feign.codec.ErrorDecoder$Default.decode(ErrorDecoder.java:92)
at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:151)
at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:80)
at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103)
at jdk.proxy2/jdk.proxy2.$Proxy5.verifyToken(Unknown Source)
at com.venafi.vcert.sdk.connectors.tpp.TppTokenConnector.verifyAccessToken(TppTokenConnector.java:96)
... 5 more
When adding usernamen and password to the Authentication object and ONLY when removing accessToken it works.
But this means, we can not persist the refreshtoken and re-use it. We always must revoke it after every "transaction"
The following code is failing:
Error:
Exception in thread "main" com.venafi.vcert.sdk.VCertException: feign.FeignException$Unauthorized: status 401 reading TppToken#verifyToken(String)
at com.venafi.vcert.sdk.VCertException.fromFeignException(VCertException.java:57)
at com.venafi.vcert.sdk.connectors.tpp.TppTokenConnector.verifyAccessToken(TppTokenConnector.java:98)
at com.venafi.vcert.sdk.connectors.tpp.TppTokenConnector.authorize(TppTokenConnector.java:70)
at com.venafi.vcert.sdk.connectors.Connector.authenticate(Connector.java:78)
at com.venafi.vcert.sdk.VCertClient.(VCertClient.java:40)
at com.venafi.vcert.sdk.VCertTknClient.(VCertTknClient.java:17)
at org.example.VenafiTest.main(VenafiTest.java:35)
Caused by: feign.FeignException$Unauthorized: status 401 reading TppToken#verifyToken(String)
at feign.FeignException.clientErrorStatus(FeignException.java:161)
at feign.FeignException.errorStatus(FeignException.java:141)
at feign.FeignException.errorStatus(FeignException.java:133)
at feign.codec.ErrorDecoder$Default.decode(ErrorDecoder.java:92)
at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:151)
at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:80)
at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103)
at jdk.proxy2/jdk.proxy2.$Proxy5.verifyToken(Unknown Source)
at com.venafi.vcert.sdk.connectors.tpp.TppTokenConnector.verifyAccessToken(TppTokenConnector.java:96)
... 5 more
When adding usernamen and password to the Authentication object and ONLY when removing accessToken it works.
But this means, we can not persist the refreshtoken and re-use it. We always must revoke it after every "transaction"