0
votes

I was able to get past invalid_callback error. Ref: Wso2 apiman: INVALID REQUEST, invalid_callback

However, I'm not able to generate tokens for api. Any workaround is much appreciated.

Caused by: javax.net.ssl.SSLException: hostname in certificate didn't match: localhost != dev.org

2020-03-01T12:06:46,418 [-] [https-jsse-nio-9443-exec-40] ERROR APIConsumerImpl Error while re-generating AccessToken org.wso2.carbon.apimgt.api.APIManagementException: Error while creating tokens - hostname in certificate didn't match: localhost != dev.org

Any other changes to be made?

2

2 Answers

1
votes

The workaround for "Error generating PRODUCTION token" is :

  1. Un-comment section [apim.oauth_config] 'revoke_endpoint' lines as shown below.

  2. Replace

Change this : revoke_endpoint = "https://localhost:${https.nio.port}/revoke"

To :revoke_endpoint = "https://dev.apigw.org:${https.nio.port}/revoke"

[apim.oauth_config]
#enable_outbound_auth_header = false
#auth_header = "Authorization"
revoke_endpoint = "https://dev.apigw.org:${https.nio.port}/revoke"
#enable_token_encryption = false
#enable_token_hashing = false
0
votes

One other approach you can follow is adding localhost as a SAN when you generate the new certificate/keystore.