Skip to content

Commit

Permalink
Support for alternate cookie domain
Browse files Browse the repository at this point in the history
  • Loading branch information
rhubarbselleven committed Mar 8, 2013
1 parent 2c9d6f7 commit bb2a20c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crowd/crowd.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ function doCrowdLogin( $credentials, $options, &$response )
$obj = json_decode($result->body);
$cookieName = $obj->name;
$cookieDomain = $obj->domain;

// if we have an alternal cookie domain, set it now.
$altCookieDomain = $this->params->get('crowd_cookie_domain');
if (is_string($altCookieDomain)) {
$cookieDomain = $altCookieDomain;
}

JLog::add('cookie name: ' . $cookieName . ', domain: ' . $cookieDomain);

// now trying to login
Expand Down
5 changes: 5 additions & 0 deletions crowd/crowd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
label="Application password"
size="40"
/>
<field name="crowd_cookie_domain" type="text"
description="Supply an alternate domain which the cookie should be stored under."
label="Alternate cookie domain"
size="40"
/>
<field name="crowd_group_map" type="textarea"
description="Group mapping like A:X;B:Y crowd A becomes joomla X, X is int"
label="Group mapping"
Expand Down
Empty file added crowd/index.html
Empty file.
Empty file added crowdsso/index.html
Empty file.

0 comments on commit bb2a20c

Please sign in to comment.