コード例 #1
0
 public boolean computeAPIPassword(HashMap<String, String> responseParameters) throws Exception {
   if (isValidShopifyResponse(responseParameters)) {
     StringBuilder builder = new StringBuilder();
     builder.append(credential.getSharedSecret());
     builder.append(responseParameters.get(TOKEN));
     credential.setPassword(toMD5Hexdigest(builder.toString()));
     if (credentialsStore != null) {
       credentialsStore.saveCredential(credential);
     }
     return true;
   }
   return false;
 }
コード例 #2
0
 public APIAuthorization(ShopifyCredentialsStore store, String shop) throws Exception {
   this(store.loadCredential(shop));
   this.credentialsStore = store;
 }