Class SwedenConnectAttributeReleaseVoter

java.lang.Object
se.swedenconnect.spring.saml.idp.attributes.release.SwedenConnectAttributeReleaseVoter
All Implemented Interfaces:
BiFunction<Saml2UserAuthentication,org.opensaml.saml.saml2.core.Attribute,AttributeReleaseVote>, AttributeReleaseVoter

public class SwedenConnectAttributeReleaseVoter extends Object implements AttributeReleaseVoter
A voter functioning according to the rules specified in Technical Specifications for the Swedish eID Framework.
Author:
Martin Lindström
  • Constructor Details

    • SwedenConnectAttributeReleaseVoter

      public SwedenConnectAttributeReleaseVoter()
  • Method Details

    • vote

      public AttributeReleaseVote vote(Saml2UserAuthentication token, org.opensaml.saml.saml2.core.Attribute attribute)
      Applies the following rules:
      • If the attribute is "urn:oid:1.2.752.29.4.13" (personalIdentityNumber) and the contents is a Swedish coordination number (as opposed to the civic registration number) we require that the SP has opted in to received coordination numbers.
      • TODO ...
      Specified by:
      vote in interface AttributeReleaseVoter
      Parameters:
      token - the authentication token
      attribute - the attribute to vote on
      Returns:
      an AttributeReleaseVote