Esempio n. 1
0
        private Boolean Check(AuthorizationContext attributeContext)
        {
            HttpCookie authCookie = this.httpCookies[KeyConst.USER_TOKEN_KEY];

            if (authCookie == null)
            {
                return(false);
            }

            FormsAuthenticationTicket authTicket = Decoder.DecodeCookie(authCookie);
            AuthModel authModel = Decoder.DecodeAccessToken(authTicket.UserData);

            if (!this.ValidateToken(authTicket, authModel))
            {
                return(false);
            }

            return(this.RunAuthCheck(authModel));
        }