C# Class Nancy.Security.NancyContextExtensions

Show file Open project: NancyFx/Nancy.MSOwinSecurity

Public Methods

Method Description
GetAuthenticationManager ( this context, bool throwOnNull = false ) : IAuthenticationManager

Gets the Microsoft owin authentication manager from the nancy context.

GetMSOwinUser ( this context ) : ClaimsPrincipal

Get the user from the Micrososft owin user from the nancy context.

Method Details

GetAuthenticationManager() public static method

Gets the Microsoft owin authentication manager from the nancy context.
public static GetAuthenticationManager ( this context, bool throwOnNull = false ) : IAuthenticationManager
context this The current nancy context.
throwOnNull bool Throws an exception if the owin reqeust environment does not exist. Otherwise null will be returned.
return IAuthenticationManager

GetMSOwinUser() public static method

Get the user from the Micrososft owin user from the nancy context.
public static GetMSOwinUser ( this context ) : ClaimsPrincipal
context this The current nancy context.
return System.Security.Claims.ClaimsPrincipal