Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 54 lines (43 sloc) 1.299 kb
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 {
const NSString *problem;
}

@property (readonly) const NSString *problem;

- (id)initWithProblem:(const NSString *)aProblem;
- (id)initWithResponseBody:(const NSString *)response;

- (BOOL)isEqualToProblem:(OAProblem *)aProblem;
- (BOOL)isEqualToString:(const NSString *)aProblem;
- (BOOL)isEqualTo:(id)aProblem;
- (int)code;

+ (OAProblem *)problemWithResponseBody:(const NSString *)response;

+ (const NSArray *)validProblems;

+ (OAProblem *)SignatureMethodRejected;
+ (OAProblem *)ParameterAbsent;
+ (OAProblem *)VersionRejected;
+ (OAProblem *)ConsumerKeyUnknown;
+ (OAProblem *)TokenRejected;
+ (OAProblem *)SignatureInvalid;
+ (OAProblem *)NonceUsed;
+ (OAProblem *)TimestampRefused;
+ (OAProblem *)TokenExpired;
+ (OAProblem *)TokenNotRenewable;

@end
Something went wrong with that request. Please try again.