I'm working on the sign SAML assertions. My code is the same as in this question:
Signing response using openSAML
I need to create the method getSigningCredential()
to make the credential object. How can I create this Credential
object?
Any help is appreciated.
There are many ways to do this, depending on where you stor your keys. Metadata, keystore or somewhere else.
I have a blog post on this subject and I discuss it further in my book A Guide to OpenSAML
Basically you use one of the provided CredentialResolvers in OpenSAML
MetadataCredentialResolver KeyStoreCredentialResolver etc...