public static async Task <HttpAuthRequest> Create(UserHttpRequest userHttpRequest) { AuthResponseBase authResponse = null; HttpRequestMessage httpRequest = new HttpRequestMessage { RequestUri = new Uri(userHttpRequest.Url) }; switch (userHttpRequest.AuthenticationConfig.AuthenticationType) { case HttpAuthenticationType.None: break; case HttpAuthenticationType.OAuth20: authResponse = await SetRequestWithOAuth20Async(httpRequest, (OAuth20AuthenticationConfig)userHttpRequest.AuthenticationConfig.AuthenticationOptions); break; default: break; } return(new HttpAuthRequest { HttpRequestMessage = httpRequest, AuthResponse = authResponse }); }
private async Task HandleSignOutsAsync(HttpAuthenticationConfig authenticationConfig, AuthResponseBase authResponse) { switch (authenticationConfig.AuthenticationType) { case HttpAuthenticationType.None: break; case HttpAuthenticationType.OAuth20: await HttpAuthRequestFactory.SignOut((OAuth20AuthenticationConfig)authenticationConfig.AuthenticationOptions, (OAuth20AuthResponse)authResponse); break; default: break; } }