class OmniAuth::Strategies::WSFed::AuthCallback
Constants
- WS_UTILITY
Attributes
options[RW]
raw_callback[RW]
settings[RW]
Public Class Methods
new(raw_callback, settings, options = {})
click to toggle source
# File lib/omniauth/strategies/wsfed/auth_callback.rb, line 15 def initialize(raw_callback, settings, options = {}) raise ArgumentError.new('Response cannot be nil.') if raw_callback.nil? raise ArgumentError.new('WSFed settings cannot be nil.') if settings.nil? self.options = options self.raw_callback = raw_callback self.settings = settings end
Public Instance Methods
audience()
click to toggle source
WS-Trust Envelope and WS* Element Values
# File lib/omniauth/strategies/wsfed/auth_callback.rb, line 34 def audience @audience ||= token.audience end
claims()
click to toggle source
# File lib/omniauth/strategies/wsfed/auth_callback.rb, line 53 def claims @claims ||= token.claims end
Also aliased as: attributes
created_at()
click to toggle source
# File lib/omniauth/strategies/wsfed/auth_callback.rb, line 38 def created_at Time.parse(REXML::XPath.first(wstrust_lifetime, '//wsu:Created', { 'wsu' => WS_UTILITY }).text) end
document()
click to toggle source
TODO: remove reference to SignedDocument (document) and move it to validation use response variable instead…
# File lib/omniauth/strategies/wsfed/auth_callback.rb, line 27 def document @document ||= OmniAuth::Strategies::WSFed::XMLSecurity::SignedDocument.new(raw_callback, settings) end
expires_at()
click to toggle source
# File lib/omniauth/strategies/wsfed/auth_callback.rb, line 42 def expires_at Time.parse(REXML::XPath.first(wstrust_lifetime, '//wsu:Expires', { 'wsu' => WS_UTILITY }).text) end
issuer()
click to toggle source
Token Values
# File lib/omniauth/strategies/wsfed/auth_callback.rb, line 49 def issuer @issuer ||= token.issuer end
name_id()
click to toggle source
The value of the user identifier as defined by the id_claim configuration setting…
# File lib/omniauth/strategies/wsfed/auth_callback.rb, line 59 def name_id @name_id ||= begin claims.has_key?(settings[:id_claim]) ? claims.fetch(settings[:id_claim]) : nil end end
Private Instance Methods
token()
click to toggle source
# File lib/omniauth/strategies/wsfed/auth_callback.rb, line 68 def token @token ||= begin case settings[:saml_version].to_s when '1' SAML1Token.new(document) else SAML2Token.new(document) end end end
wstrust_lifetime()
click to toggle source
WS-Trust token lifetime element
# File lib/omniauth/strategies/wsfed/auth_callback.rb, line 81 def wstrust_lifetime @wstrust_lifetime ||= begin REXML::XPath.first(document, '//t:RequestSecurityTokenResponse/t:Lifetime', { 't' => WS_TRUST }) end end