TroopID_Connect - Version 1.4.1

Version Notes

Fix edge case with callback URL not using HTTPS.

Download this release

Release Info

Developer ID.me
Extension TroopID_Connect
Version 1.4.1
Comparing to
See all releases


Code changes from version 1.4.0 to 1.4.1

app/code/community/TroopID/Connect/Block/Adminhtml/System/Config/Instructions.php CHANGED
@@ -9,8 +9,8 @@ class TroopID_Connect_Block_Adminhtml_System_Config_Instructions extends TroopID
9
  $html .= '<ul class="steps">';
10
  $html .= '<li>' . $this->__("Create a developer account at") . ' <a href="' . $config["developer_url"] . '" target="_blank">' . $config["developer_url"] . '</a></li>';
11
  $html .= '<li>' . $this->__("Register an application at") . ' <a href="' . $config["apps_url"] . '" target="_blank">' . $config["apps_url"] . '</a></li>';
12
- $html .= '<li>' . $this->__("Fill in <strong>Redirect URI</strong> with") . ' ' . Mage::getUrl("troopid/authorize/callback", array("_store" => $this->getStore()->getCode(), "_store_to_url" => false, "_nosid" => true)) . '</li>';
13
- $html .= '<li>' . $this->__("Fill in <strong>Base URI</strong> with") . ' ' . $this->getStore()->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB) . '</li>';
14
  $html .= '<li>' . $this->__("Copy and paste your <strong>Client ID</strong> and <strong>Client Secret</strong> values from your application settings on ID.me") . '</li>';
15
  $html .= '<li>' . $this->__("That's it! You are ready to go.") . '</li>';
16
  $html .= '<li>' . $this->__("You can customize the buttons by overriding or extending the cart template.") . '</li>';
@@ -39,4 +39,12 @@ class TroopID_Connect_Block_Adminhtml_System_Config_Instructions extends TroopID
39
  return $front;
40
  }
41
 
 
 
 
 
 
 
 
 
42
  }
9
  $html .= '<ul class="steps">';
10
  $html .= '<li>' . $this->__("Create a developer account at") . ' <a href="' . $config["developer_url"] . '" target="_blank">' . $config["developer_url"] . '</a></li>';
11
  $html .= '<li>' . $this->__("Register an application at") . ' <a href="' . $config["apps_url"] . '" target="_blank">' . $config["apps_url"] . '</a></li>';
12
+ $html .= '<li>' . $this->__("Fill in <strong>Redirect URI</strong> with") . ' ' . $this->getCallbackUrl() . '</li>';
13
+ $html .= '<li>' . $this->__("Fill in <strong>Base URI</strong> with") . ' ' . $this->getBaseUrl() . '</li>';
14
  $html .= '<li>' . $this->__("Copy and paste your <strong>Client ID</strong> and <strong>Client Secret</strong> values from your application settings on ID.me") . '</li>';
15
  $html .= '<li>' . $this->__("That's it! You are ready to go.") . '</li>';
16
  $html .= '<li>' . $this->__("You can customize the buttons by overriding or extending the cart template.") . '</li>';
39
  return $front;
40
  }
41
 
42
+ public function getCallbackUrl() {
43
+ return Mage::getUrl("troopid/authorize/callback", array('_secure' => Mage::app()->getFrontController()->getRequest()->isSecure(), "_nosid" => true));
44
+ }
45
+
46
+ public function getBaseUrl() {
47
+ return $this->getStore()->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB, array('_secure' => Mage::app()->getFrontController()->getRequest()->isSecure(), "_nosid" => true));
48
+ }
49
+
50
  }
app/code/community/TroopID/Connect/Block/Cart.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  class TroopID_Connect_Block_Cart extends Mage_Checkout_Block_Cart_Abstract {
3
 
4
  public function isOperational() {
@@ -10,11 +11,11 @@ class TroopID_Connect_Block_Cart extends Mage_Checkout_Block_Cart_Abstract {
10
  }
11
 
12
  public function getEndpoint() {
13
- return Mage::getUrl("troopid/authorize/authorize", array('_secure' => Mage::app()->getFrontController()->getRequest()->isSecure()));
14
  }
15
 
16
  public function getRemoveUrl() {
17
- return Mage::getUrl("troopid/authorize/remove", array('_secure' => Mage::app()->getFrontController()->getRequest()->isSecure()));
18
  }
19
 
20
  public function hasAffiliation() {
1
  <?php
2
+
3
  class TroopID_Connect_Block_Cart extends Mage_Checkout_Block_Cart_Abstract {
4
 
5
  public function isOperational() {
11
  }
12
 
13
  public function getEndpoint() {
14
+ return Mage::getUrl("troopid/authorize/authorize", array('_secure' => Mage::app()->getFrontController()->getRequest()->isSecure(), "_nosid" => true));
15
  }
16
 
17
  public function getRemoveUrl() {
18
+ return Mage::getUrl("troopid/authorize/remove", array('_secure' => Mage::app()->getFrontController()->getRequest()->isSecure(), "_nosid" => true));
19
  }
20
 
21
  public function hasAffiliation() {
app/code/community/TroopID/Connect/Helper/Oauth.php CHANGED
@@ -15,7 +15,7 @@ class TroopID_Connect_Helper_Oauth extends Mage_Core_Helper_Abstract {
15
  }
16
 
17
  private function getCallbackUrl() {
18
- return Mage::getUrl("troopid/authorize/callback");
19
  }
20
 
21
  public function getAuthorizeUrl($scope = "military") {
15
  }
16
 
17
  private function getCallbackUrl() {
18
+ return Mage::getUrl("troopid/authorize/callback", array('_secure' => Mage::app()->getFrontController()->getRequest()->isSecure(), "_nosid" => true));
19
  }
20
 
21
  public function getAuthorizeUrl($scope = "military") {
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>TroopID_Connect</name>
4
- <version>1.4.0</version>
5
  <stability>stable</stability>
6
  <license>OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>ID.me Integration</summary>
10
  <description>N/A</description>
11
- <notes>Remove sandbox settings and update styling as per new style guide.</notes>
12
  <authors><author><name>ID.me</name><user>idme</user><email>support@id.me</email></author></authors>
13
- <date>2014-11-14</date>
14
- <time>21:29:31</time>
15
- <contents><target name="magecommunity"><dir name="TroopID"><dir name="Connect"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="View"><dir name="Tab"><file name="Affiliation.php" hash="d2f7b9f00585fc7d2b558096c31f5de1"/></dir></dir></dir></dir><dir name="System"><dir name="Config"><file name="Custom.php" hash="0f7f75b4b55edb638d241852a0220b3f"/><file name="Instructions.php" hash="f28988ab9fe72951229b58321f980f96"/></dir></dir></dir><file name="Cart.php" hash="b772c8cba699f4fd433157e1c3fa8d8d"/></dir><dir name="Helper"><file name="Data.php" hash="72586f83d6d5b3b4208f242e410208db"/><file name="Oauth.php" hash="ab6572b3e7683e45a26b2f939b1e4ffa"/></dir><dir name="Model"><dir name="Cart"><file name="Observer.php" hash="c837fb0c02ac02416200002d5e3b233c"/></dir><dir name="Rule"><file name="Condition.php" hash="345e7992da8bd7d543e9d25ed92e1d66"/><file name="Observer.php" hash="ff3a6cc43e4d46401a4bbb37262f4f56"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Enabled.php" hash="103e4776ee228d313fcb63c0eefcb0db"/></dir></dir></dir></dir><dir name="controllers"><file name="AuthorizeController.php" hash="fa9f2560b2d04995091835935037cc2a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="2bba51d29a0e9c444ff401a460a44142"/><file name="config.xml" hash="25effbb6c1487f4db22443f8a47f0af2"/><file name="system.xml" hash="22c0372a79c65417cf1239591fc37d64"/></dir><dir name="sql"><dir name="troopid_connect_setup"><file name="mysql4-install-0.1.0.php" hash="2ed9e5f82407c756477d7fc2d3cd20ff"/><file name="mysql4-upgrade-0.2.0-0.3.0.php" hash="6160551e6951f91ab7ef18e887ea73a9"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="troopid"><file name="idme.css" hash="950827f2031330fed931930c12b5fa88"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="troopid"><file name="idme.css" hash="57964a12675c76bca426475515160dcc"/><dir name="images"><file name="logo.png" hash="65421456771898d7cbced7b99d4b56ea"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="TroopID_Connect.xml" hash="daae0990b13ba4071764efd4f9f674ec"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="troopid_connect.xml" hash="760c7d73dcab51068a0db524699b354e"/></dir><dir name="template"><dir name="troopid"><dir name="connect"><file name="affiliation.phtml" hash="69c74c5b4d78f1f6822be88d1a3bd928"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="troopid_connect.xml" hash="f83172a0eaea9b8c185f49f0864bf8cb"/></dir><dir name="template"><dir name="troopid"><dir name="connect"><file name="callback.phtml" hash="71b10af7408d6f50999529c08aa75dfb"/><file name="cart.phtml" hash="2df306654373065c7b0d5299b248379c"/><file name="script.phtml" hash="5e281cd246f5d02fae91ff9742ee9088"/></dir></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>TroopID_Connect</name>
4
+ <version>1.4.1</version>
5
  <stability>stable</stability>
6
  <license>OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>ID.me Integration</summary>
10
  <description>N/A</description>
11
+ <notes>Fix edge case with callback URL not using HTTPS.</notes>
12
  <authors><author><name>ID.me</name><user>idme</user><email>support@id.me</email></author></authors>
13
+ <date>2015-02-12</date>
14
+ <time>16:55:33</time>
15
+ <contents><target name="magecommunity"><dir name="TroopID"><dir name="Connect"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="View"><dir name="Tab"><file name="Affiliation.php" hash="d2f7b9f00585fc7d2b558096c31f5de1"/></dir></dir></dir></dir><dir name="System"><dir name="Config"><file name="Custom.php" hash="0f7f75b4b55edb638d241852a0220b3f"/><file name="Instructions.php" hash="f77a29215496b77bf9e41210542248ef"/></dir></dir></dir><file name="Cart.php" hash="f5cf782ae0f872f8c27cb89a3e3c0f91"/></dir><dir name="Helper"><file name="Data.php" hash="72586f83d6d5b3b4208f242e410208db"/><file name="Oauth.php" hash="4c9359e38192bd909edf16a4fdfde0c7"/></dir><dir name="Model"><dir name="Cart"><file name="Observer.php" hash="c837fb0c02ac02416200002d5e3b233c"/></dir><dir name="Rule"><file name="Condition.php" hash="345e7992da8bd7d543e9d25ed92e1d66"/><file name="Observer.php" hash="ff3a6cc43e4d46401a4bbb37262f4f56"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Enabled.php" hash="103e4776ee228d313fcb63c0eefcb0db"/></dir></dir></dir></dir><dir name="controllers"><file name="AuthorizeController.php" hash="fa9f2560b2d04995091835935037cc2a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="2bba51d29a0e9c444ff401a460a44142"/><file name="config.xml" hash="25effbb6c1487f4db22443f8a47f0af2"/><file name="system.xml" hash="22c0372a79c65417cf1239591fc37d64"/></dir><dir name="sql"><dir name="troopid_connect_setup"><file name="mysql4-install-0.1.0.php" hash="2ed9e5f82407c756477d7fc2d3cd20ff"/><file name="mysql4-upgrade-0.2.0-0.3.0.php" hash="6160551e6951f91ab7ef18e887ea73a9"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="troopid"><file name="idme.css" hash="950827f2031330fed931930c12b5fa88"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="troopid"><file name="idme.css" hash="57964a12675c76bca426475515160dcc"/><dir name="images"><file name="logo.png" hash="65421456771898d7cbced7b99d4b56ea"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="TroopID_Connect.xml" hash="daae0990b13ba4071764efd4f9f674ec"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="troopid_connect.xml" hash="760c7d73dcab51068a0db524699b354e"/></dir><dir name="template"><dir name="troopid"><dir name="connect"><file name="affiliation.phtml" hash="69c74c5b4d78f1f6822be88d1a3bd928"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="troopid_connect.xml" hash="f83172a0eaea9b8c185f49f0864bf8cb"/></dir><dir name="template"><dir name="troopid"><dir name="connect"><file name="callback.phtml" hash="71b10af7408d6f50999529c08aa75dfb"/><file name="cart.phtml" hash="2df306654373065c7b0d5299b248379c"/><file name="script.phtml" hash="5e281cd246f5d02fae91ff9742ee9088"/></dir></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>