lib/maestrano/sso/user.rb in maestrano-1.0.0.pre.RC5 vs lib/maestrano/sso/user.rb in maestrano-1.0.0.pre.RC6
- old
+ new
@@ -12,23 +12,23 @@
# user.country = auth[:info][:country]
# user.company = auth[:info][:company_name]
# end
raise NoMethodError, "You need to override find_for_maestrano_auth in your #{self.class.name} model"
end
-
+
# Check whether the user is a maestrano one
def maestrano?
if self.respond_to?(:provider)
return self.provider.to_s == 'maestrano'
else
raise NoMethodError, "You need to override maestrano? in your #{self.class.name} model"
end
end
-
+
# Check whether the SSO session is still valid
# or not
- def maestrano_session_valid?(session)
- Maestrano::SSO::Session.new(session).valid?
+ def maestrano_session_valid?(session, preset = nil)
+ Maestrano::SSO::Session[preset].new(session).valid?
end
end
end
-end
\ No newline at end of file
+end