Class KeycloakKeySamlExtensionGenerator
java.lang.Object
org.keycloak.saml.processing.core.util.KeycloakKeySamlExtensionGenerator
- All Implemented Interfaces:
SamlProtocolExtensionsAwareBuilder.NodeGenerator
public class KeycloakKeySamlExtensionGenerator
extends Object
implements SamlProtocolExtensionsAwareBuilder.NodeGenerator
- Author:
- hmlnarik
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getMessageSigningKeyIdFromElement
(Element element) Checks that the given element is indeed a Keycloak extensionKeyInfo
element and returns a content ofMessageSigningKeyId
attribute in the given element.void
write
(XMLStreamWriter writer) Generate contents of the <samlp:Extensions> tag.
-
Field Details
-
NS_URI
- See Also:
-
NS_PREFIX
- See Also:
-
KC_KEY_INFO_ELEMENT_NAME
- See Also:
-
KEY_ID_ATTRIBUTE_NAME
- See Also:
-
-
Constructor Details
-
KeycloakKeySamlExtensionGenerator
-
-
Method Details
-
write
Description copied from interface:SamlProtocolExtensionsAwareBuilder.NodeGenerator
Generate contents of the <samlp:Extensions> tag. When this method is invoked, the writer has already emitted the <samlp:Extensions> start tag.- Specified by:
write
in interfaceSamlProtocolExtensionsAwareBuilder.NodeGenerator
- Parameters:
writer
- Writer to use for producing XML output- Throws:
ProcessingException
- If any exception fails
-
getMessageSigningKeyIdFromElement
Checks that the given element is indeed a Keycloak extensionKeyInfo
element and returns a content ofMessageSigningKeyId
attribute in the given element.- Parameters:
element
- Element to obtain the key info from.- Returns:
null
if the element is unknown or there isMessageSigningKeyId
attribute unset, value of theMessageSigningKeyId
attribute otherwise.
-