This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public async Task<UserDigest> CurrentUserAsync(HttpRequestMessage req) | |
| { | |
| var userIssuer = ClaimsPrincipal.Current.Claims.Where(f => f.Type.Contains("name")).FirstOrDefault(); | |
| if (userIssuer != null && userIssuer.Issuer.ToUpper() == "LOCAL AUTHORITY") | |
| { | |
| if (req != null) | |
| { | |
| IEnumerable<string> ids = new List<string>(); | |
| req.Headers.TryGetValues("UserId", out ids); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // from https://github.com/BallardChalmers/BCServerlessDemo.DataAndFunctions/blob/master/BCServerless.DataAndFunctions.Functions/Api/JourneysApi.cs | |
| public async Task<HttpResponseMessage> Post(HttpRequestMessage req, TraceWriter log) | |
| { | |
| var payload = await req.Content.ReadAsAsync<Journey>(); | |
| var item = await _JourneyService.CreateAsync(payload, req); | |
| return req.CreateResponse(HttpStatusCode.Created, item); | |
| } |