public class StaticKeyInfoGenerator extends Object implements KeyInfoGenerator
KeyInfoGenerator
which always returns static KeyInfo
data.
Note that the argument to generate(Credential)
is not used in generating the new KeyInfo,
and so may be null.
If the original KeyInfo that was passed to this instance is already the child of some other
XMLObject at the time generate(Credential)
is called, then a newly constructed KeyInfo
object will be returned that contains the same data as the original. Otherwise, the original
KeyInfo instance is returned directly.Modifier and Type | Field and Description |
---|---|
private KeyInfo |
keyInfo
The KeyInfo object held by this generator instance.
|
private org.opensaml.core.xml.io.Marshaller |
keyInfoMarshaller
Marshaller used in cloning operation.
|
private org.opensaml.core.xml.io.Unmarshaller |
keyInfoUnmarshaller
Unmarshaller used in cloning operation.
|
Constructor and Description |
---|
StaticKeyInfoGenerator(KeyInfo newKeyInfo)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private KeyInfo |
clone(KeyInfo origKeyInfo)
Clone a KeyInfo and return the new object.
|
KeyInfo |
generate(org.opensaml.security.credential.Credential credential) |
KeyInfo |
getKeyInfo()
Get the static KeyInfo object held by this generator.
|
private org.opensaml.core.xml.io.Marshaller |
getMarshaller()
Get a KeyInfo marshaller.
|
private org.opensaml.core.xml.io.Unmarshaller |
getUnmarshaller()
Get a KeyInfo unmarshaller.
|
void |
setKeyInfo(KeyInfo newKeyInfo)
Set the static KeyInfo object held by this generator.
|
private KeyInfo keyInfo
private org.opensaml.core.xml.io.Unmarshaller keyInfoUnmarshaller
private org.opensaml.core.xml.io.Marshaller keyInfoMarshaller
@Nonnull public KeyInfo generate(@Nullable org.opensaml.security.credential.Credential credential) throws org.opensaml.security.SecurityException
generate
in interface KeyInfoGenerator
org.opensaml.security.SecurityException
@Nonnull public KeyInfo getKeyInfo()
public void setKeyInfo(@Nonnull KeyInfo newKeyInfo)
newKeyInfo
- the new KeyInfo object@Nonnull private KeyInfo clone(@Nonnull KeyInfo origKeyInfo) throws org.opensaml.security.SecurityException
origKeyInfo
- the KeyInfo object to cloneorg.opensaml.security.SecurityException
- thrown in there are marshalling or unmarshalling errors during cloning@Nonnull private org.opensaml.core.xml.io.Marshaller getMarshaller() throws org.opensaml.security.SecurityException
org.opensaml.security.SecurityException
- thrown if there is an error obtaining the marshaller from the configuration@Nonnull private org.opensaml.core.xml.io.Unmarshaller getUnmarshaller() throws org.opensaml.security.SecurityException
org.opensaml.security.SecurityException
- thrown if there is an error obtaining the unmarshaller from the configurationCopyright © 1999–2020 Shibboleth Consortium. All rights reserved.