public static Create ( string authBaseUri, string clientId, string clientSecret, IEnumerable |
||
authBaseUri | string | The base auth URI e.g. https://auth.alitudeangel.com |
clientId | string | Your client ID |
clientSecret | string | Your client secret |
scopes | IEnumerable |
Requested scopes |
existingState | DotNetOpenAuth.OAuth2.AuthorizationState | (optional) An existing state object from a previous session. May be null. |
return |
/// <summary> /// Create the message handler. Modify this to support different scopes. /// </summary> /// <returns></returns> public override HttpMessageHandler CreateMessageHandler() { _handlerInfo = ApiOAuthClientHandler.Create( _authUrl, _clientId, _clientSecret, new[] { "query_mapdata", "query_mapairdata", "talk_tower", "query_userinfo", "manage_flightreports" }, _existingState, true, "https://aawings.com/", new WpfAuthorizeDisplay()); return(_handlerInfo.ClientHandler); }
/// <summary> /// Create the message handler. Modify this to support different scopes. /// </summary> /// <returns></returns> public override HttpMessageHandler CreateMessageHandler() { _handlerInfo = ApiOAuthClientHandler.Create( _authUrl, ConfigurationManager.AppSettings["ClientId"], ConfigurationManager.AppSettings["ClientSecret"], new[] { "query_mapdata", "query_mapairdata", "talk_tower", "query_userinfo" }, _existingState, true, "https://aawings.com/", new WpfAuthorizeDisplay()); return(_handlerInfo.ClientHandler); }