Browse files

Add a 'logout_url' method that returns the valid CAS Logout endpoint …

…so we can store it for logging out later-on
  • Loading branch information...
1 parent 7845f94 commit 4fbbcb6b37f3e6963b720d063d2de6c637649012 @meanphil committed Jun 7, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/omniauth/strategies/cas.rb
View
7 lib/omniauth/strategies/cas.rb
@@ -121,6 +121,13 @@ def service_validate_url(service_url, ticket)
def login_url(service)
cas_host + append_params( @options.login_url, { :service => service })
end
+
+ # Build a CAS logout URL from +service+.
+ #
+ # @return [String] a URL like `http://cas.mycompany.com/logout`
+ def logout_url
+ cas_host + @options.logout_url
+ end
# Adds URL-escaped +parameters+ to +base+.
#

0 comments on commit 4fbbcb6

Please sign in to comment.