-
-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to sign metadata. (Improved) #213
Conversation
…into Umofomia-sign-metadata
…int optional on metadata generator, signature position fixed). Fix algorithm calculator
@Lordnibbler, @luisvm what do you think about this PR? |
end | ||
|
||
it "creates a signed metadata" do | ||
assert_match %r[<ds:SignatureValue>\s*([a-zA-Z0-9/+=]+)\s*</ds:SignatureValue>]m, xml_text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, I originally added the two \s*
in the regular expression and the m
at the end of it to take into account the fact that the metadata was being pretty-printed. Now that you took out the pretty-printing for the test, these should no longer be needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
xml_text = OneLogin::RubySaml::Metadata.new.generate(settings, true) | ||
# assert correct xml declaration | ||
start = "<?xml version='1.0' encoding='UTF-8'?>\n<md:EntityDescriptor" | ||
assert xml_text[0..start.length-1] == start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably good to use assert_equal
here to be consistent
comments aside looks good 👍 |
Add ability to sign metadata. (Improved)
Related to #207.
Improved:
Fix algorithm calculator. This method was wrong