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 |
*/ |
a0a843
|
17 |
|
H |
18 |
#import <TwitterCore/TWTRCoreOAuthSigning.h> |
|
19 |
|
|
20 |
@class TWTRAuthConfig; |
|
21 |
@class TWTRSession; |
|
22 |
|
|
23 |
NS_ASSUME_NONNULL_BEGIN |
|
24 |
|
|
25 |
/** |
|
26 |
* This class provides tools to generate OAuth signatures. |
|
27 |
*/ |
|
28 |
@interface TWTROAuthSigning : NSObject <TWTRCoreOAuthSigning> |
|
29 |
|
|
30 |
/** |
|
31 |
* @name Initialization |
|
32 |
*/ |
|
33 |
|
|
34 |
/** |
|
35 |
* Instantiate a `TWTROAuthSigning` object with the parameters it needs to generate the OAuth signatures. |
|
36 |
* |
|
37 |
* @param authConfig (required) Encapsulates credentials required to authenticate a Twitter application. |
|
38 |
* @param authSession (required) Encapsulated credentials associated with a user session. |
|
39 |
* |
|
40 |
* @return An initialized `TWTROAuthSigning` object or nil if any of the parameters are missing. |
|
41 |
* |
|
42 |
* @note If you want to generate OAuth Echo headers to verify Digits' credentials, see `DGTOAuthSigning`. |
|
43 |
* |
|
44 |
* @see TWTRAuthConfig |
|
45 |
* @see TWTRSession |
|
46 |
*/ |
|
47 |
- (instancetype)initWithAuthConfig:(TWTRAuthConfig *)authConfig authSession:(TWTRSession *)authSession NS_DESIGNATED_INITIALIZER; |
|
48 |
|
|
49 |
/** |
|
50 |
* Unavailable. Use `-initWithAuthConfig:authSession:` instead. |
|
51 |
*/ |
|
52 |
- (instancetype)init NS_UNAVAILABLE; |
|
53 |
|
|
54 |
@end |
|
55 |
|
|
56 |
NS_ASSUME_NONNULL_END |