commit | author | age
|
655e66
|
1 |
/* |
H |
2 |
* Copyright (C) 2017 Twitter, Inc. |
|
3 |
* |
|
4 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 |
* you may not use this file except in compliance with the License. |
|
6 |
* You may obtain a copy of the License at |
|
7 |
* |
|
8 |
* http://www.apache.org/licenses/LICENSE-2.0 |
|
9 |
* |
|
10 |
* Unless required by applicable law or agreed to in writing, software |
|
11 |
* distributed under the License is distributed on an "AS IS" BASIS, |
|
12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 |
* See the License for the specific language governing permissions and |
|
14 |
* limitations under the License. |
|
15 |
* |
|
16 |
*/ |
|
17 |
|
a0a843
|
18 |
@class TWTRAuthConfig; |
H |
19 |
@protocol TWTRAuthSession; |
|
20 |
|
|
21 |
NS_ASSUME_NONNULL_BEGIN |
|
22 |
|
|
23 |
/** |
|
24 |
* Signer abstracting logic and type of user auth to sign a user authenticated network request. |
|
25 |
*/ |
|
26 |
@interface TWTRUserAuthRequestSigner : NSObject |
|
27 |
|
|
28 |
/** |
|
29 |
* Signs the given request with the appropriate user authentication headers. |
|
30 |
* |
|
31 |
* @param URLRequest URL request to sign |
|
32 |
* @param authConfig The auth config containing the app's `consumerKey` and `consumerSecret` |
|
33 |
* @param session The authenticated user session |
|
34 |
* |
|
35 |
* @return The signed URL request |
|
36 |
*/ |
|
37 |
+ (NSURLRequest *)signedURLRequest:(NSURLRequest *)URLRequest authConfig:(TWTRAuthConfig *)authConfig session:(id<TWTRAuthSession>)session; |
|
38 |
|
|
39 |
@end |
|
40 |
|
|
41 |
NS_ASSUME_NONNULL_END |