public static OAuthClient createDossiaOAuthClient() { OAuthClient returnValue = new OAuthClient() { ConsumerKey = ConfigurationManager.AppSettings["oauth.consumer.key"], ConsumerSecret = ConfigurationManager.AppSettings["oauth.consumer.secret"], RequestTokenUrl = new Uri(ConfigurationManager.AppSettings["oauth.request.token.url"]), AuthorizeTokenUrl = new Uri(ConfigurationManager.AppSettings["oauth.authorize.token.url"]), AccessTokenUrl = new Uri(ConfigurationManager.AppSettings["oauth.access.token.url"]) }; return returnValue; }
/// <summary> /// Create a new instance of OAuthExtension. /// </summary> /// <param name="core">The OpenIdClient to use.</param> /// <param name="oauthClient">The OAuth Consumer to use.</param> public OAuthExtension(ClientCore core, OAuthClient oauthClient) { _Parent = core.StateContainer; _Parent.RegisterPlugIn(this); OAuthClient = oauthClient; }
/// <summary> /// Create a new instance of OAuthExtension. /// </summary> /// <param name="state">OpenIdClient's StateContainer object.</param> /// <param name="oauthClient">The OAuth Consumer to use.</param> public OAuthExtension(StateContainer state, OAuthClient oauthClient) { _Parent = state; state.RegisterPlugIn(this); OAuthClient = oauthClient; }