-
Notifications
You must be signed in to change notification settings - Fork 96
Open
Description
I noticed that at this line https://github.com/SoftUni/SPA-with-AngularJS/blob/master/Ads-REST-Services/Ads.Web/Controllers/UserController.cs#L122 you're using the TestServer class to issue the new token. I noticed that the token isn't working if you then pass it to any authorized method.
Instead I replaced that code with:
HttpClient hc = new HttpClient();
var request = HttpContext.Current.Request;
var tokenServiceResponse = await hc.PostAsync(string.Format("{0}://{1}", request.Url.Scheme, request.Url.Authority) + Startup.OAuthOptions.TokenEndpointPath.ToString(), requestParamsFormUrlEncoded);
This way it's actually calling our real /Token route and retrieving a valid token.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels