package at.gv.egovernment.moa.id.protocols.pvp2x.builder.attributes; import org.opensaml.saml2.core.Attribute; import at.gv.egovernment.moa.id.auth.data.AuthenticationSession; public class EIDIssuingNationAttributeBuilder extends BaseAttributeBuilder { public String getName() { return EID_ISSUING_NATION_NAME; } public Attribute build(AuthenticationSession authSession) { String countryCode = "AT"; if(authSession.getStorkAuthnRequest() != null) { countryCode = authSession.getStorkAuthnRequest().getCitizenCountryCode(); } return buildStringAttribute(EID_ISSUING_NATION_FRIENDLY_NAME, EID_ISSUING_NATION_NAME, countryCode); } public Attribute buildEmpty() { return buildemptyAttribute(EID_ISSUING_NATION_FRIENDLY_NAME, EID_ISSUING_NATION_NAME); } }