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
-
Constructor Summary
ConstructorDescriptionUserMessageExtension
(se.swedenconnect.opensaml.sweid.saml2.authn.umsg.UserMessage userMessage) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGets the messages contained within theUserMessage
extension.Gets the MIME type for the messages.Gets the processed messages.void
setProcessedMessages
(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
- aUserMessage
object- 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 theUserMessage
extension.Each entry of the returned
Map
holds 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
Map
of language codes and Base64 encoded messages
-
getProcessedMessages
Gets the processed messages. If aUserMessagePreprocessor
is installed, theprocessedMessages
will 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
null
if the messages haven't been processed
-
setProcessedMessages
Assigns the processed messages. If aUserMessagePreprocessor
is installed, theprocessedMessages
will 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
-