AFAIK SAML Token is signed using the tenant keystore. You can use the
org.wso2.carbon.core.util.KeyStoreManager to achieve that. There are
getDefaultPrivateKey and getDefaultPublicKey which will give you the
default keys of the keystore.

Thanks & Regards
Danushka Fernando
Senior Software Engineer
WSO2 inc. http://wso2.com/
Mobile : +94716332729

On Thu, Oct 6, 2016 at 5:38 PM, Niranda Perera <nira...@wso2.com> wrote:

> Hi,
>
> I am trying to create a SAML response manually. This is a special type of
> SAML response named SAML NameIdResponse and I am trying to set a signature
> in it.
>
> I am trying to create a signature element, as mentioned here [1].
>
> For me to do this, I need to access the private and public keys
> programatically.
>
> Could you please point me to a place where I could extract these
> information?
>
> Best
>
> [1] http://www.programcreek.com/java-api-examples/index.
> php?source_dir=saml-generator-master/src/main/java/com/rackspace/saml/
> SamlAssertionProducer.java
>
> --
> *Niranda Perera*
> Software Engineer, WSO2 Inc.
> Mobile: +94-71-554-8430
> Twitter: @n1r44 <https://twitter.com/N1R44>
> https://pythagoreanscript.wordpress.com/
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to