Class UserMessageExtension
java.lang.Object
se.swedenconnect.spring.saml.idp.extensions.UserMessageExtension
- All Implemented Interfaces:
Serializable
Representation of a
UserMessage, see User
Message Extension in SAML Authentication Requests.- Author:
- Martin Lindström
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUserMessageExtension(se.swedenconnect.opensaml.sweid.saml2.authn.umsg.UserMessage userMessage) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGets the messages contained within theUserMessageextension.Gets the MIME type for the messages.Gets the processed messages.voidsetProcessedMessages(Map<String, String> processedMessages) Assigns the processed messages.
-
Field Details
-
NO_LANG
Symbolic constant used to specify that no language was given.- See Also:
-
-
Constructor Details
-
UserMessageExtension
public UserMessageExtension(@NonNull se.swedenconnect.opensaml.sweid.saml2.authn.umsg.UserMessage userMessage) throws InvalidMimeTypeException Constructor.- Parameters:
userMessage- aUserMessageobject- Throws:
InvalidMimeTypeException- if the supplied MIME type is invalid
-
-
Method Details
-
getMimeType
Gets the MIME type for the messages.- Returns:
- the MIME type
-
getMessages
Gets the messages contained within theUserMessageextension.Each entry of the returned
Mapholds the language code as the key and the Base64 encoded message as the value. Note "NO_LANG" will be used as key if no language was specified.- Returns:
- a
Mapof language codes and Base64 encoded messages
-
getProcessedMessages
Gets the processed messages. If aUserMessagePreprocessoris installed, theprocessedMessageswill contain the result from this processing, i.e., strings that are prepared for display (on a web page, on a device, ...).- Returns:
- messages ready for displaying, or
nullif the messages haven't been processed
-
setProcessedMessages
Assigns the processed messages. If aUserMessagePreprocessoris installed, theprocessedMessageswill contain the result from this processing, i.e., strings that are prepared for display (on a web page, on a device, ...).- Parameters:
processedMessages- processed messages
-