forked from jdg/oauthconsumer
-
Notifications
You must be signed in to change notification settings - Fork 2
/
OAProblem.h
53 lines (43 loc) · 1.23 KB
/
OAProblem.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//
// OAProblem.h
// OAuthConsumer
//
// Created by Alberto García Hierro on 03/09/08.
// Copyright 2008 Alberto García Hierro. All rights reserved.
// bynotes.com
#import <Foundation/Foundation.h>
enum {
kOAProblemSignatureMethodRejected = 0,
kOAProblemParameterAbsent,
kOAProblemVersionRejected,
kOAProblemConsumerKeyUnknown,
kOAProblemTokenRejected,
kOAProblemSignatureInvalid,
kOAProblemNonceUsed,
kOAProblemTimestampRefused,
kOAProblemTokenExpired,
kOAProblemTokenNotRenewable
};
@interface OAProblem : NSObject {
NSString *problem;
}
@property (readonly) NSString *problem;
- (id)initWithProblem:(NSString *)aProblem;
- (id)initWithResponseBody:(NSString *)response;
- (BOOL)isEqualToProblem:(OAProblem *)aProblem;
- (BOOL)isEqualToString:(NSString *)aProblem;
- (BOOL)isEqualTo:(id)aProblem;
- (int)code;
+ (OAProblem *)problemWithResponseBody:(NSString *)response;
+ (NSArray *)validProblems;
+ (OAProblem *)SignatureMethodRejected;
+ (OAProblem *)ParameterAbsent;
+ (OAProblem *)VersionRejected;
+ (OAProblem *)ConsumerKeyUnknown;
+ (OAProblem *)TokenRejected;
+ (OAProblem *)SignatureInvalid;
+ (OAProblem *)NonceUsed;
+ (OAProblem *)TimestampRefused;
+ (OAProblem *)TokenExpired;
+ (OAProblem *)TokenNotRenewable;
@end