commit | author | age
|
a0a843
|
1 |
// |
H |
2 |
// TWTRUserAuthRequestSigner.h |
|
3 |
// TwitterKit |
|
4 |
// |
|
5 |
// Created by Kang Chen on 7/1/15. |
|
6 |
// Copyright (c) 2015 Twitter. All rights reserved. |
|
7 |
// |
|
8 |
|
|
9 |
@class TWTRAuthConfig; |
|
10 |
@protocol TWTRAuthSession; |
|
11 |
|
|
12 |
NS_ASSUME_NONNULL_BEGIN |
|
13 |
|
|
14 |
/** |
|
15 |
* Signer abstracting logic and type of user auth to sign a user authenticated network request. |
|
16 |
*/ |
|
17 |
@interface TWTRUserAuthRequestSigner : NSObject |
|
18 |
|
|
19 |
/** |
|
20 |
* Signs the given request with the appropriate user authentication headers. |
|
21 |
* |
|
22 |
* @param URLRequest URL request to sign |
|
23 |
* @param authConfig The auth config containing the app's `consumerKey` and `consumerSecret` |
|
24 |
* @param session The authenticated user session |
|
25 |
* |
|
26 |
* @return The signed URL request |
|
27 |
*/ |
|
28 |
+ (NSURLRequest *)signedURLRequest:(NSURLRequest *)URLRequest authConfig:(TWTRAuthConfig *)authConfig session:(id<TWTRAuthSession>)session; |
|
29 |
|
|
30 |
@end |
|
31 |
|
|
32 |
NS_ASSUME_NONNULL_END |