Example #1
0
        /// <summary>
        /// Gets the user claims and saves this to the cookie
        /// </summary>
        public void OnResultExecuting(ResultExecutingContext context)
        {
            //set the cookie in here
            if (!context.HttpContext.User.HasClaim(cl => cl.Type == "TokenType"))
            {
                throw new NullReferenceException("Token not set");
            }

            SetCookie(context.HttpContext.Response, KoreAuthToken.GetAuthTokenFromClaims(context.HttpContext.User));
        }
 public KoreAuthToken GetAuthToken()
 {
     return(KoreAuthToken.GetAuthTokenFromClaims(User));
 }