LtiLibrary / LtiAdvantageTool

Sample LTI Advantage Tool.
https://advantagetool.azurewebsites.net
MIT License
14 stars 14 forks source link

Adding Gradebook line item unauthorized #11

Open ExtremeKaos opened 1 year ago

ExtremeKaos commented 1 year ago

Adding a lineitem to a gradebook results in unathorized (?handler=CreateLineItem)

The JWT Header response is empty and the JWT Payload works.

In toool.csthml.cs, IsSuccessStatusCode return false.

using (var response = await httpClient.PostAsync( LtiRequest.AssignmentGradeServices.LineItemsUrl, new StringContent(JsonConvert.SerializeObject(lineItem), Encoding.UTF8, Constants.MediaTypes.LineItem))) { if (!response.IsSuccessStatusCode) { Error = response.ReasonPhrase; return Page(); } }

Any advice ? Thanks