Skip to content

Commit

Permalink
Merge branch 'zeroturnaround-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Aug 17, 2018
2 parents 4ff652a + 3ff7c9e commit 1a03a1a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mujina-idp/src/main/java/mujina/idp/SsoController.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,13 @@ private void doSSO(HttpServletRequest request, HttpServletResponse response, Aut

String assertionConsumerServiceURL = idpConfiguration.getAcsEndpoint() != null ? idpConfiguration.getAcsEndpoint() : authnRequest.getAssertionConsumerServiceURL();

List<SAMLAttribute> attributes = attributes(authentication.getName());

SAMLPrincipal principal = new SAMLPrincipal(
authentication.getName(),
NameIDType.UNSPECIFIED,
attributes(authentication.getName()),
attributes.stream().filter(attr -> "urn:oasis:names:tc:SAML:1.1:nameid-format".equals(attr.getName()))
.findFirst().map(attr -> attr.getValue()).orElse(NameIDType.UNSPECIFIED),
attributes,
authnRequest.getIssuer().getValue(),
authnRequest.getID(),
assertionConsumerServiceURL,
Expand Down

0 comments on commit 1a03a1a

Please sign in to comment.