24 lines
650 B
C#
24 lines
650 B
C#
using Microsoft.AspNetCore.Http;
|
|
|
|
namespace BlueWest.WebApi.Controllers
|
|
{
|
|
public static class SessionExtensions
|
|
{
|
|
/// <summary>
|
|
/// Check for the session token header
|
|
/// </summary>
|
|
/// <param name="headerDictionary"></param>
|
|
/// <returns></returns>
|
|
public static string GetSessionTokenHeader(this IHeaderDictionary headerDictionary)
|
|
{
|
|
if (headerDictionary.ContainsKey(SessionConstants.SessionTokenHeaderName))
|
|
{
|
|
return headerDictionary[SessionConstants.SessionTokenHeaderName];
|
|
}
|
|
|
|
return string.Empty;
|
|
}
|
|
}
|
|
}
|
|
|