decryptNameID decrypts encryptedID, a saml:EncryptedID element, with decrypt, which returns the root element of the plaintext, and returns the saml:NameID it holds. Other identifiers (BaseID, or an EncryptedID that does not hold a NameID) are rejected.
(encryptedID *etree.Element, decrypt func(*etree.Element) (*etree.Element, error))
| 21 | // saml:NameID it holds. Other identifiers (BaseID, or an EncryptedID that |
| 22 | // does not hold a NameID) are rejected. |
| 23 | func decryptNameID(encryptedID *etree.Element, decrypt func(*etree.Element) (*etree.Element, error)) (*NameID, error) { |
| 24 | nameID, _, err := decryptIdentifier(encryptedID, decrypt, false) |
| 25 | return nameID, err |
| 26 | } |
| 27 | |
| 28 | // decryptIdentifier decrypts encryptedID, a saml:EncryptedID element, with |
| 29 | // decrypt, which returns the root element of the plaintext. It returns the |