Add helper methods to JwtPayload with names similar to ShopifyApp JWT to make deprecation migration easier.
def shopify_domain
@payload && ShopifyApp::Utils.sanitize_shop_domain(@payload["dest"])
end
def shopify_user_id
@payload["sub"].to_i if @payload && @payload["sub"]
end
def expire_at
@payload["exp"].to_i if @payload && @payload["exp"]
end
How has this been tested?
Unit tested the methods to return expected values
Checklist:
[x] My commit message follow the pattern described in here
[x] I have performed a self-review of my own code.
[x] I have added tests that prove my fix is effective or that my feature works.
Description
Add helper methods to JwtPayload with names similar to ShopifyApp JWT to make deprecation migration easier.
How has this been tested?
Unit tested the methods to return expected values
Checklist: