1
0
mirror of https://github.com/wulkanowy/wulkanowy.git synced 2025-01-19 06:26:51 -06:00

Fix adfs login (#110)

This commit is contained in:
Mikołaj Pich 2018-05-14 20:56:17 +02:00 committed by Rafał Borcz
parent 95caa21f2a
commit 08dd316aee

View File

@ -130,6 +130,10 @@ public class Login {
.parse(certificate.replaceAll(":", ""), "", Parser.xmlParser()) .parse(certificate.replaceAll(":", ""), "", Parser.xmlParser())
.select("[AttributeName=\"UserInstance\"] samlAttributeValue"); .select("[AttributeName=\"UserInstance\"] samlAttributeValue");
if (instances.isEmpty()) { // on adfs login
return "";
}
if (instances.size() < 2) { // 1st index is always `Default` if (instances.size() < 2) { // 1st index is always `Default`
throw new AccountPermissionException("First login detected, specify symbol"); throw new AccountPermissionException("First login detected, specify symbol");
} }