private static void AddCustomPropertiesTokenResponsePayload(TokenEndpointResponseContext context) { foreach (var property in context.HttpContext.Items.Where(item => item.Key.ToString().StartsWith("as:"))) { context.Payload.Add(property.Key as string, new JValue(property.Value)); } }
public override Task TokenEndpointResponse(TokenEndpointResponseContext context) { AddCustomPropertiesTokenResponsePayload(context); return(Task.FromResult(true)); }