This repository has been archived by the owner on Nov 30, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Combined AuthShopify, AuthToken into new VerifyShopify middleware * SessionToken value object created to verify and validate all aspects of the JWT * New unauthenticated route and view added * Removal of ITP, cookie helper, shop session as they're unneeded * Added Polaris skeleton to token view * Revised initial package landing page * Added session ID support * Moved AuthorizeShop to InstallShop * Condensed InstallShop and modified to return an array * Modified InstallShop to track access token update time * Modified Shop command to track access token update time * Support for other routes and token usage * Removed authenticate.oauth route * Removed oauthfailure method on authenticate controller * Removed ShopSession class * Updated shopify-config to reference new authenticate routes (install, token) * Updated shopify-config to remove old authenticate routes * Updated ShopModel's getToken to getAccessToken for naming conflict purposes * Removed old ITP and authenticate routes from built-in route provider * Updated SHOPIFY_API_REDRIECT to use /install instead of old /authenticate * Revert authenticate route back to authenticate instead of 'install' * Updated test class naming for DeleteWebhooks action * Added TurboLink support * Change name for test package * Added getToken helper * Added missing auth url exception * Added billing to allowed routes, change token receipt * Exception added to prevent loop redirects if authorization link is empty * Added billing payments with tokens * Removed unused classes * Added test cases for session token * Test cases added for session context, verify shop middleware * Check for "?" in URLs instead of "&" when determining the separator (#777) * Fix test: use `authenticate.token` instead of `authenticate.oauth` (#776) * Use `contains()` to support route prefixes (#775) * Use an env var for the new `turbo_enabled` config setting (#774) * Updated code to use AuthManager from Laravel instead of auth() * Updated response codes to use HTTP constants * Update to BillingController and Billable middleware to remove old ShopSession service * Remove "token" from the query string of the target URL (#779) * Feature/cookieless - changes for turbolinks, install app (#780) * Redirect if the user clicked on any link before load Turbo * Find shop domain in request when getting the token (#784) * Add param to constructor to optionally not verify the token * Add static method `ShopDomain::getFromRequest()` to find the shop domain * Remove extraneous `ShopDomain` calls * Always pass the filtered query params to the token redirect (#785) * Added TokenRedirect macro for Laravel Redirect * Added TokenRoute macro for Laravel URL/Route * Updated ShopDomain::getFromRequest to be ShopDomain::fromRequest for consistency * Moved HMAC and HMAC generation/comparison to value object (Hmac) * Move SessionContext to be a composite value object * Updated to handle Blade session tokens * Added Blade directive "@sessionToken" * Added support for jQuery, Turbolinks, and Axios for token bearer * Added support for ".session-token" to automatically update with the token value * Update jQuery ajax header Authorization setting (#790) * Use template style setting for jQuery.ajaxSetup * Use window.jQuery.ajaxSettings.headers = { } instead of ajaxSetup method * Clean up on bearer token header settings * Remove legacy factories package * Billing flow adjusted to use tokens * Fix to Kernel testcase referring to old middleware * Fix to undefined methods for macros * Remove build and bin folders from repo * Added test for `tokenRoute` * Added test for `tokenRedirect` * Modified `TokenRedirect` and `TokenUrl` macros to use a common base class * Added test for sessionToken directive * Fix to SessionContext validity check for domain comparison * Resolve static method not found for tests on tokenRedirect and tokenRoute Co-authored-by: Lucas Michot <lucas@semalead.com> Co-authored-by: Vitaly <32259003+Enmaboya@users.noreply.github.com> Co-authored-by: Scott Carpenter <scott@payforstay.com> Co-authored-by: Tyler King <osiset@users.noreply.github.com> Co-authored-by: Vitaliy Dubov <vdubov@simtechdev.org> Co-authored-by: Stephen Sweetland <steve.sweetland@gmail.com> Co-authored-by: Tony Le <55417634+thang12l@users.noreply.github.com> Co-authored-by: Lucas Michot <lucas@semalead.com>
- Loading branch information
1 parent
1971084
commit 4efa931
Showing
92 changed files
with
2,774 additions
and
3,764 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/bin | ||
/build | ||
/vendor | ||
composer.lock | ||
.phpunit.result.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace Osiset\ShopifyApp\Contracts\Objects\Values; | ||
|
||
use Funeralzone\ValueObjects\ValueObject; | ||
|
||
/** | ||
* Session ID from session token. | ||
*/ | ||
interface SessionId extends ValueObject | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace Osiset\ShopifyApp\Contracts\Objects\Values; | ||
|
||
use Funeralzone\ValueObjects\ValueObject; | ||
|
||
/** | ||
* Session token. | ||
*/ | ||
interface SessionToken extends ValueObject | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace Osiset\ShopifyApp\Directives; | ||
|
||
/** | ||
* Provides a Blade directive for session tokens. | ||
*/ | ||
class SessionToken | ||
{ | ||
/** | ||
* Output for the directive. | ||
* | ||
* @return string | ||
*/ | ||
public function __invoke(): string | ||
{ | ||
return '<input type="hidden" class="session-token" name="token" value="" />'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace Osiset\ShopifyApp\Exceptions; | ||
|
||
/** | ||
* Exception for handling a missing shop's myshopify domain. | ||
*/ | ||
class MissingAuthUrlException extends BaseException | ||
{ | ||
} |
Oops, something went wrong.