Hey,
I'm sending a Live JWT token to ACS to receive a JWT token for my application.
The code im using is:
HttpClient httpClient = new HttpClient(); httpClient.BaseAddress = new Uri("https://*****.accesscontrol.windows.net"); string scope = "scope="+Uri.EscapeUriString("http://****.cloudapp.net/"); string format = "grant_type=" + Uri.EscapeUriString("http://oauth.net/grant_type/jwt/1.0/bearer"); string assertion = "assertion=" + Uri.EscapeUriString(loginResult.Session.AuthenticationToken); string data = scope + "&" + format + "&" + assertion; HttpResponseMessage response = await httpClient.PostAsync("v2/OAuth2-13", new StringContent(data, Encoding.UTF8, "application/x-www-form-urlencoded"));
Im receiving the follow error:
{"error":"invalid_client","error_description":"ACS50027: Invalid JWT token. ACS50027: Invalid JWT token. Found unsupported token header. Supported headers are: \u0027alg\u0027, \u0027typ\u0027, \u0027x5t\u0027.\r\nTrace ID: 6deda9c1-340f-416e-a163-d467acc4b7f1\r\nCorrelation ID: da5f12de-8ad6-484a-99c5-8faa7120e214\r\nTimestamp: 2013-06-07 01:42:07Z"}
What am I doing wrong?