2 // OAMutableURLRequest.h
5 // Created by Jon Crosby on 10/19/07.
6 // Copyright 2007 Kaboomerang LLC. All rights reserved.
7 // Modified by Cassie Doll on 02/02/09
9 // Permission is hereby granted, free of charge, to any person obtaining a copy
10 // of this software and associated documentation files (the "Software"), to deal
11 // in the Software without restriction, including without limitation the rights
12 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 // copies of the Software, and to permit persons to whom the Software is
14 // furnished to do so, subject to the following conditions:
16 // The above copyright notice and this permission notice shall be included in
17 // all copies or substantial portions of the Software.
19 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28 #import <Foundation/Foundation.h>
29 #import "OASignatureProviding.h"
32 @class OAHMAC_SHA1SignatureProvider;
33 @class OARequestParameter;
36 @interface OAMutableURLRequest : NSMutableURLRequest {
42 id<OASignatureProviding> signatureProvider;
45 NSMutableArray *parameters;
47 @property(readonly) NSString *signature;
48 @property(readonly) NSString *nonce;
49 @property(retain) NSMutableArray *parameters;
51 - (id)initWithURL:(NSURL *)aUrl
52 consumer:(OAConsumer *)aConsumer
53 token:(OAToken *)aToken;
55 - (id)initWithURL:(NSURL *)aUrl
56 parameters:(NSArray *)extraParameters
57 consumer:(OAConsumer *)aConsumer
58 token:(OAToken *)aToken;
60 - (id)initWithURL:(NSURL *)aUrl
61 consumer:(OAConsumer *)aConsumer
62 token:(OAToken *)aToken
63 realm:(NSString *)aRealm
64 signatureProvider:(id<OASignatureProviding, NSObject>)aProvider;
66 - (id)initWithURL:(NSURL *)aUrl
67 parameters:(NSArray *)extraParameters
68 consumer:(OAConsumer *)aConsumer
69 token:(OAToken *)aToken
70 realm:(NSString *)aRealm
71 signatureProvider:(id<OASignatureProviding, NSObject>)aProvider
72 nonce:(NSString *)aNonce
73 timestamp:(NSString *)aTimestamp;