public ExternalUser GetAuthenticatedUser() { if (_cachedUser != null) { return(_cachedUser); } var ticketToken = GetRequestTicketToken(); if (ticketToken == null || ticketToken.Length < TOKEN_LENTH) { return(null); } var token = ticketToken.Substring(TOKEN_LENTH); var identity = _oAuthProvider.GetIdentity(token); return(GetAuthenticatedUserByTicket(identity)); }