Hi Pramod,
You can use Signature class to verify signature. Please see below code
snippet.
java.security.Signature signature =
java.security.Signature.getInstance("SHA1withRSA");
signature.initVerify(publicKey);
signature.verify(signature)
Thanks
Godwin
On Thu, Jan 14, 2016 at 2:51 PM,
Hi Pramod,
We keep only supper tenant keystore in the physical file system and tenant
keystores stores in registry. You can get the public certificate for the
specific tenant using KeyStoreManager class. Please see below code snippet.
KeyStoreManager.getInstance(tenantId).getDefaultPublicKey()
Hi,
This won't help I think any how since i am outside of wso2 so I don't have
access to KeyStoreManager.
The problem is simple, I have a jwt token generated by wso2 which is
transferred in the header to the client using X-JWT-TOKEN now i need to
validate it in the client side using a public
Hi Godwin,
Thanks for the reply,
Then how can I validate the jwt token that is generated by the wso2 in the
client.
I need to validate the signature of jwt token generated by Wso2 using the
public key.
On Thu, Jan 14, 2016 at 2:39 PM, Godwin Shrimal wrote:
> Hi Pramod,
>
Hi,
Have a look at extractAppIdFromIdToken funtion of [1]
[1]
https://github.com/apache/stratos/blob/master/components/org.apache.stratos.metadata.service/src/main/java/org/apache/stratos/metadata/service/handlers/OAuthHandler.java
On Thu, Jan 14, 2016 at 3:07 PM, Godwin Shrimal
Hi Pramod,
I have done somewhat similar to what you are trying and can share more
details if it suits your requirement.
In the scenario I did, the client application is a webapp deployed in the
WSO2 Application Server. It uses a utility (you can find the code in [1])
which is built and put into
Hi,
How can I get public key certificate to validate JWT token in wso2 Api
Manager for tenant.
The problem i am facing is, i couldn't get the public certificate in the
physical directory but wso2 is managing to sign the token, i couldn't get
how.
Please reply.
--
* Regards*
* Pramod
Hi,
How can I get public key certificate to validate JWT token signature in
wso2 Api Manager for tenant.
The problem I am facing is,I couldn't get the public certificate in the
physical directory but wso2 is managing to sign the token, I couldn't get
how.
On Thu, Jan 14, 2016 at 12:57 PM,
Hi Pramod,
We are storing the public certificate file in wso2carbon.jks keystore. You
can find it in /repository/resources/security directory.
Refer to [1] for obtaining the certificate. For example you can use the
following command to get the public certificate. Keystore password will be