Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
shopify_iossdk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cemarose
shopify_iossdk
Commits
554abcb1
Commit
554abcb1
authored
Jul 20, 2016
by
Brent Gulanowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass the customer access token to callbacks after login and renew.
parent
1cc02e5b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
BUYClient+Customers.h
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Customers.h
+1
-1
BUYClient+Customers.m
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Customers.m
+3
-4
No files found.
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Customers.h
View file @
554abcb1
...
...
@@ -55,7 +55,7 @@ typedef void (^BUYDataCustomerTokenBlock)(BUYCustomer * _Nullable customer, BUYC
* @param token An authentication token to retrieve the customer later. Store this token securely on the device.
* @param error An optional NSError
*/
typedef
void
(
^
BUYDataTokenBlock
)(
NSString
*
_Nullable
token
,
NSError
*
_Nullable
error
);
typedef
void
(
^
BUYDataTokenBlock
)(
BUYCustomerToken
*
_Nullable
token
,
NSError
*
_Nullable
error
);
/**
* Return block containing an array of BUYOrders
...
...
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Customers.m
View file @
554abcb1
...
...
@@ -118,13 +118,12 @@
NSURL
*
url
=
[
self
urlForCustomersTokenRenewal
];
return
[
self
putRequestForURL
:
url
object
:
nil
completionHandler
:^
(
NSDictionary
*
json
,
NSHTTPURLResponse
*
response
,
NSError
*
error
)
{
NSString
*
access
Token
=
nil
;
BUYCustomerToken
*
customer
Token
=
nil
;
if
(
json
&&
!
error
)
{
BUYCustomerToken
*
customerToken
=
[
BUYCustomerToken
customerTokenWithJSON
:
json
];
accessToken
=
customerToken
.
accessToken
;
customerToken
=
[
BUYCustomerToken
customerTokenWithJSONDictionary
:
json
];
}
block
(
access
Token
,
error
);
block
(
customer
Token
,
error
);
}];
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment