Class: Lyrebird::Assertion
- Inherits:
-
Object
- Object
- Lyrebird::Assertion
- Defined in:
- lib/lyrebird/assertion.rb
Instance Method Summary collapse
- #document ⇒ Object
-
#initialize(issuer: DEFAULTS.issuer, name_id: DEFAULTS.name_id, name_id_format: DEFAULTS.name_id_format, recipient: DEFAULTS.recipient, in_response_to: DEFAULTS.in_response_to, not_before: nil, valid_for: DEFAULTS.valid_for, audience: DEFAULTS.audience, authn_context: DEFAULTS.authn_context, attributes: DEFAULTS.attributes) ⇒ Assertion
constructor
A new instance of Assertion.
Constructor Details
#initialize(issuer: DEFAULTS.issuer, name_id: DEFAULTS.name_id, name_id_format: DEFAULTS.name_id_format, recipient: DEFAULTS.recipient, in_response_to: DEFAULTS.in_response_to, not_before: nil, valid_for: DEFAULTS.valid_for, audience: DEFAULTS.audience, authn_context: DEFAULTS.authn_context, attributes: DEFAULTS.attributes) ⇒ Assertion
Returns a new instance of Assertion.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/lyrebird/assertion.rb', line 5 def initialize( issuer: DEFAULTS.issuer, name_id: DEFAULTS.name_id, name_id_format: DEFAULTS.name_id_format, recipient: DEFAULTS.recipient, in_response_to: DEFAULTS.in_response_to, not_before: nil, valid_for: DEFAULTS.valid_for, audience: DEFAULTS.audience, authn_context: DEFAULTS.authn_context, attributes: DEFAULTS.attributes ) @issue_instant = Time.now.utc @issuer = issuer @name_id = name_id @name_id_format = name_id_format @recipient = recipient @in_response_to = in_response_to @not_before = not_before || @issue_instant @not_on_or_after = @issue_instant + valid_for @audience = audience @authn_context = authn_context @attributes = attributes end |
Instance Method Details
#document ⇒ Object
30 31 32 33 34 |
# File 'lib/lyrebird/assertion.rb', line 30 def document @document ||= Nokogiri::XML::Document.new.tap do |doc| doc.root = root(doc) end end |