SGOAuth


This class maintains a single 2-legged OAuth implementation.

Conforms to: SGAuthorization
Superclass: NSObject
Declared In: SGOAuth.h

Discussion

In order to use 2-legged OAuth SGLocationService , you must set HTTPAuthorizer . All HTTP requests that come from SGLLocationService will be wrapped by this authorization protocol.



Methods

-initWithKey:secret:

Initializes a new instance of SGOAuth with the proper credentials.

+resume

Initializes a new instance with the most recently used secret and consumer key.

-save

Stores the token in the user's standard defaults. 

-unSave

Removes any token that is stored in the user's standard defaults.


initWithKey:secret:


Initializes a new instance of SGOAuth with the proper credentials.

- (id) initWithKey:(NSString *)key secret:(NSString *)secret; 
Parameters
key

The consumer key.

secret

The secret key/

Return Value

A new instance of SGOAuth.


resume


Initializes a new instance with the most recently used secret and consumer key.

+ (SGOAuth*) resume; 
Return Value

 A new instance of SGOAuth.


save


Stores the token in the user's standard defaults. 

- (void) save; 


unSave


Removes any token that is stored in the user's standard defaults.

- (void) unSave; 

Properties

consumerKey

The consumer key.

secretKey

The secret key.


consumerKey


The consumer key.

@property (
    nonatomic,
    readonly) NSString* consumerKey; 


secretKey


The secret key.

@property (
    nonatomic,
    readonly) NSString* secretKey; 
Discussion

@ property

© SimpleGeo Last Updated: 03/31/2010