KEYCLOAK-1491 AttributeStatement must contain one or more attribute or encryptedattribute statements
This commit is contained in:
parent
f55ab0d689
commit
55dc42e147
1 changed files with 5 additions and 1 deletions
|
@ -448,8 +448,12 @@ public class SamlProtocol implements LoginProtocol {
|
|||
if (roleListMapper == null) return;
|
||||
AssertionType assertion = response.getAssertions().get(0).getAssertion();
|
||||
AttributeStatementType attributeStatement = new AttributeStatementType();
|
||||
assertion.addStatement(attributeStatement);
|
||||
roleListMapper.mapper.mapRoles(attributeStatement, roleListMapper.model, session, userSession, clientSession);
|
||||
|
||||
//SAML Spec 2.7.3 AttributeStatement must contain one or more Attribute or EncryptedAttribute
|
||||
if(attributeStatement.getAttributes().size() > 0) {
|
||||
assertion.addStatement(attributeStatement);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue