lib/casclient/client.rb
# Returns the CAS server's logout url.
#
# If a logout_url has not been explicitly configured,
# the default is cas_base_url + "/logout".
#
# destination_url:: Set this if you want the user to be
#                   able to immediately log back in. Generally
#                   you'll want to use something like <tt>request.referer</tt>.
#                   Note that the above behaviour describes RubyCAS-Server 
#                   -- other CAS server implementations might use this
#                   parameter differently (or not at all).
# follow_url:: This satisfies section 2.3.1 of the CAS protocol spec.
#              See http://www.ja-sig.org/products/cas/overview/protocol
Returns the CAS server's logout url.
If a logout_url has not been explicitly configured,
the default is cas_base_url + "/logout".

: Set this if you want the user to be
able to immediately log back in. Generally
you'll want to use something like request.referer.
Note that the above behaviour describes RubyCAS-Server
other CAS server implementations might use this
parameter differently (or not at all).
follow_url:: This satisfies section 2.3.1 of the CAS protocol spec.
Returns the CAS server ' s logout url . If a logout_url has not been explicitly configured the default is cas_base_url + " / logout " . : Set this if you want the user to be able to immediately log back in . Generally you ' ll want to use something like request . referer . Note that the above behaviour describes RubyCAS - Server other CAS server implementations might use this parameter differently ( or not at all ) . follow_url :: This satisfies section 2 . 3 . 1 of the CAS protocol spec .
def logout_url(destination_url = nil, follow_url = nil)
      url = @logout_url || (cas_base_url + "/logout")
      if destination_url
        duri = URI.parse(destination_url)
        h = duri.query ? query_to_hash(duri.query) : {}
        h.delete('ticket')
        duri.query = hash_to_query(h)
        destination_url = duri.to_s.gsub(/\?$/, '')
      end
      if destination_url || follow_url
        uri = URI.parse(url)
        h = uri.query ? query_to_hash(uri.query) : {}
        h['destination'] = destination_url if destination_url
        h['url'] = follow_url if follow_url
        uri.query = hash_to_query(h)
        uri.to_s
      else
        url
      end
    end
def logout_url ( destination_url = nil , follow_url = nil ) url = @logout_url || ( cas_base_url + "/logout" ) if destination_url duri = URI . parse ( destination_url ) h = duri . query ? query_to_hash ( duri . query ) : { } h . delete ( 'ticket' ) duri . query = hash_to_query ( h ) destination_url = duri . to_s . gsub ( / \? $ / , '' ) end if destination_url || follow_url uri = URI . parse ( url ) h = uri . query ? query_to_hash ( uri . query ) : { } h [ 'destination' ] = destination_url if destination_url h [ 'url' ] = follow_url if follow_url uri . query = hash_to_query ( h ) uri . to_s else url end end
Returns the CAS server's logout url.
Returns the CAS server ' s logout url .
# if present, remove the 'ticket' parameter from the destination_url
destination_url
follow_url