I can't find a straightforward way to provide these values in any
other way, other than to subclass several classes so I an override +
(Class)_authorizationMethodClassForURL:(NSURL *)inBaseURL
withConfiguration:(NSDictionary **)outConfig
Is this the intended behavior?
My service needs to have these values set dynamically as we have
several different environments to test against (localhost, dev,
staging, beta, production), and it seems silly to list these all in
the oauthAutoConfig.plist.
Any problem if I provide an alternate means of configuration, where I
can pass in a dictionary of the values instead of loading them from
the oauthAutoConfig.plist?
thanks,
Logan
To do what you want, you can instantiate an MPOAuthAPI instance and
pass NO for autoStart:. Then you'd manually create an
MPOAuthAuthenticationMethodOAuth instance and set that as your
authenticationMethod. After setting that up, then you'd call
authenticate.
_Karl
Sent from my iPhone
> --
> You received this message because you are subscribed to the Google
> Groups "OAuth Objective-C" group.
> To post to this group, send email to oauth-ob...@googlegroups.com
> .
> To unsubscribe from this group, send email to oauth-objectiv...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/oauth-objective-c?hl=en
> .
>
I figured that's how it would work, but it asserts the configuration
during initialization:
*** Assertion failure in -[MPOAuthAuthenticationMethodOAuth
initWithAPI:forURL:withConfiguration:],
MPOAuthAuthenticationMethodOAuth.m:49
I'm doing this:
_oauthAPI = [[MPOAuthAPI alloc] initWithCredentials:credentials
authenticationURL:[NSURL URLWithString:baseURLString]
andBaseURL:[NSURL URLWithString:baseURLString]
autoStart:NO];
[_oauthAPI setSignatureScheme:MPOAuthSignatureSchemePlainText];
[(MPOAuthAuthenticationMethodOAuth *)[_oauthAPI
authenticationMethod] setDelegate:self];
[_oauthAPI authenticate];
But the assertion fails in the init method.
So there either needs to be a way to pass in the authorizationMethod
at init, or pass in the configuration at init, or the assertion needs
to be moved out of the init method of
MPOAuthAuthenticationMethodOAuth, or something else?
I can submit a patch, does one of these sound best to you?
Logan
I submitted a patch:
http://code.google.com/p/mpoauthconnection/issues/detail?id=31#c0