mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-1364: Merge do not rely on Collectors.toUnmodifiableMap().
This commit is contained in:
@@ -92,13 +92,13 @@ public class SAMLAuthenticatedUser extends AbstractAuthenticatedUser {
|
|||||||
* for substitution as parameter tokens.
|
* for substitution as parameter tokens.
|
||||||
*/
|
*/
|
||||||
private Map<String, String> getTokens(AssertedIdentity identity) {
|
private Map<String, String> getTokens(AssertedIdentity identity) {
|
||||||
return identity.getAttributes().entrySet()
|
return Collections.unmodifiableMap(identity.getAttributes().entrySet()
|
||||||
.stream()
|
.stream()
|
||||||
.filter((entry) -> !entry.getValue().isEmpty())
|
.filter((entry) -> !entry.getValue().isEmpty())
|
||||||
.collect(Collectors.toUnmodifiableMap(
|
.collect(Collectors.toMap(
|
||||||
(entry) -> TokenName.canonicalize(entry.getKey(), SAML_ATTRIBUTE_TOKEN_PREFIX),
|
(entry) -> TokenName.canonicalize(entry.getKey(), SAML_ATTRIBUTE_TOKEN_PREFIX),
|
||||||
(entry) -> entry.getValue().get(0)
|
(entry) -> entry.getValue().get(0)
|
||||||
));
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user