changed git call from https to git readonly
[atutor.git] / mods / atsocial_iphone_app / OAuth / OAMutableURLRequest.h
1 //
2 //  OAMutableURLRequest.h
3 //  OAuthConsumer
4 //
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
8 //
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:
15 //
16 //  The above copyright notice and this permission notice shall be included in
17 //  all copies or substantial portions of the Software.
18 //
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
25 //  THE SOFTWARE.
26
27
28 #import <Foundation/Foundation.h>
29 #import "OASignatureProviding.h"
30 @class OAConsumer;
31 @class OAToken;
32 @class OAHMAC_SHA1SignatureProvider;
33 @class OARequestParameter;
34
35
36 @interface OAMutableURLRequest : NSMutableURLRequest {
37 @protected
38   OAConsumer *consumer;
39   OAToken *token;
40   NSString *realm;
41   NSString *signature;
42   id<OASignatureProviding> signatureProvider;
43   NSString *nonce;
44   NSString *timestamp;
45   NSMutableArray *parameters;
46 }
47 @property(readonly) NSString *signature;
48 @property(readonly) NSString *nonce;
49 @property(retain) NSMutableArray *parameters;
50
51 - (id)initWithURL:(NSURL *)aUrl
52          consumer:(OAConsumer *)aConsumer
53             token:(OAToken *)aToken;
54
55 - (id)initWithURL:(NSURL *)aUrl
56        parameters:(NSArray *)extraParameters
57          consumer:(OAConsumer *)aConsumer
58             token:(OAToken *)aToken;
59
60 - (id)initWithURL:(NSURL *)aUrl
61          consumer:(OAConsumer *)aConsumer
62             token:(OAToken *)aToken
63             realm:(NSString *)aRealm
64 signatureProvider:(id<OASignatureProviding, NSObject>)aProvider;
65
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;
74
75 - (void)prepare;
76
77 @end