Skip to content

Commit

Permalink
Get bewit payload extension
Browse files Browse the repository at this point in the history
  • Loading branch information
glucaci committed Mar 3, 2021
1 parent 02965cf commit a1b3566
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Core/BewitContextExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ public static class BewitContextExtensions
}
}

public static BewitContext GetBewitContext(
public static T GetBewitPayload<T>(
this IHttpContextAccessor httpContextAccessor)
where T : class
{
return httpContextAccessor.GetBewitContext().Get<T>();
}

private static BewitContext GetBewitContext(
this IHttpContextAccessor httpContextAccessor)
{
HttpContext httpContext = httpContextAccessor?.HttpContext;
Expand Down

0 comments on commit a1b3566

Please sign in to comment.