def get_attributes(self):
attributes = {}<EOL>attribute_nodes = self.__query_assertion('<STR_LIT>')<EOL>for attribute_node in attribute_nodes:<EOL><INDENT>attr_name = attribute_node.get('<STR_LIT:Name>')<EOL>if attr_name in attributes.keys():<EOL><INDENT>raise OneLogin_Saml2_ValidationError(<EOL>'<STR_LIT>',<EOL>OneLogin_Saml2_ValidationError.DUPLICATED_ATTRIBUTE_NAME_FOUND<EOL>)<EOL><DEDENT>values = []<EOL>for attr in attribute_node.iterchildren('<STR_LIT>' % OneLogin_Saml2_Constants.NSMAP[OneLogin_Saml2_Constants.NS_PREFIX_SAML]):<EOL><INDENT>attr_text = OneLogin_Saml2_Utils.element_text(attr)<EOL>if attr_text:<EOL><INDENT>attr_text = attr_text.strip()<EOL>if attr_text:<EOL><INDENT>values.append(attr_text)<EOL><DEDENT><DEDENT>for nameid in attr.iterchildren('<STR_LIT>' % OneLogin_Saml2_Constants.NSMAP[OneLogin_Saml2_Constants.NS_PREFIX_SAML]):<EOL><INDENT>values.append({<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': nameid.get('<STR_LIT>'),<EOL>'<STR_LIT>': nameid.get('<STR_LIT>'),<EOL>'<STR_LIT:value>': OneLogin_Saml2_Utils.element_text(nameid)<EOL>}<EOL>})<EOL><DEDENT><DEDENT>attributes[attr_name] = values<EOL><DEDENT>return attributes<EOL>
Gets the Attributes from the AttributeStatement element.
EncryptedAttributes are not supported