MPOAuthAuthenticationMethodOAuth.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //
  2. // MPOAuthAuthenticationMethodOAuth.h
  3. // MPOAuthConnection
  4. //
  5. // Created by Karl Adam on 09.12.19.
  6. // Copyright 2009 matrixPointer. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "MPOAuthAuthenticationMethod.h"
  10. #import "MPOAuthAPI.h"
  11. #import "MPOAuthAPIRequestLoader.h"
  12. extern NSString * const MPOAuthNotificationRequestTokenReceived;
  13. extern NSString * const MPOAuthNotificationRequestTokenRejected;
  14. @protocol MPOAuthAuthenticationMethodOAuthDelegate;
  15. @interface MPOAuthAuthenticationMethodOAuth : MPOAuthAuthenticationMethod <MPOAuthAPIInternalClient> {
  16. NSURL *oauthRequestTokenURL_;
  17. NSURL *oauthAuthorizeTokenURL_;
  18. BOOL oauth10aModeActive_;
  19. id <MPOAuthAuthenticationMethodOAuthDelegate> delegate_;
  20. }
  21. @property (nonatomic, readwrite, assign) id <MPOAuthAuthenticationMethodOAuthDelegate> delegate;
  22. @property (nonatomic, readwrite, retain) NSURL *oauthRequestTokenURL;
  23. @property (nonatomic, readwrite, retain) NSURL *oauthAuthorizeTokenURL;
  24. - (void)authenticate;
  25. @end
  26. @protocol MPOAuthAuthenticationMethodOAuthDelegate <NSObject>
  27. - (NSURL *)callbackURLForCompletedUserAuthorization;
  28. - (BOOL)automaticallyRequestAuthenticationFromURL:(NSURL *)inAuthURL withCallbackURL:(NSURL *)inCallbackURL;
  29. @optional
  30. - (NSString *)oauthVerifierForCompletedUserAuthorization;
  31. - (void)authenticationDidFailWithError:(NSError *)error;
  32. @end