Sholo.Web.Security/Authentication/User/Provider/CacheUserAuthenticationTicketProvider.cs
/// <summary>
/// Verify that the supplied UserAuthenticationTicket exists in the ticket store
/// </summary>
/// <param name="ticket">The UserAuthenticationTicket to verify</param>
/// <returns>
/// True if the ticket exists in the ticket store and the properties of that 
/// ticket match the properties of the ticket in the ticket store.
/// </returns>
Verify that the supplied UserAuthenticationTicket exists in the ticket store
Verify that the supplied UserAuthenticationTicket exists in the ticket store
public override bool VerifyTicket(UserAuthenticationTicket ticket)
        {
            if (ticket == null)
            {
                throw new ArgumentNullException("ticket", "UserAuthenticationTicket parameter cannot be null.");
            }
            string incomingTicket = ticket.Key;
            UserAuthenticationTicket cacheAuthTicket = GetTicket(incomingTicket);
            if (cacheAuthTicket != null)
            {
                string cacheTicket = cacheAuthTicket.Key;
                if (cacheTicket == incomingTicket)
                {
                    if (string.Compare(cacheAuthTicket.Username, ticket.Username, StringComparison.OrdinalIgnoreCase) != 0)
                    {
                        return false;
                    }
                    return true;
                }
            }
            else
            {
                return false;
            }
            return false;
        }
public override bool VerifyTicket ( UserAuthenticationTicket ticket ) { if ( ticket == null ) { throw new ArgumentNullException ( " " , " " ) ; } string incomingTicket = ticket . Key ; UserAuthenticationTicket cacheAuthTicket = GetTicket ( incomingTicket ) ; if ( cacheAuthTicket != null ) { string cacheTicket = cacheAuthTicket . Key ; if ( cacheTicket == incomingTicket ) { if ( string . Compare ( cacheAuthTicket . Username , ticket . Username , StringComparison . OrdinalIgnoreCase ) != 0 ) { return false ; } return true ; } } else { return false ; } return false ; }
Verify that the supplied UserAuthenticationTicket exists in the ticket store
Verify that the supplied UserAuthenticationTicket exists in the ticket store
True if the ticket exists in the ticket store and the properties of that
ticket match the properties of the ticket in the ticket store.
True if the ticket exists in the ticket store and the properties of that ticket match the properties of the ticket in the ticket store .
ticket
UserAuthenticationTicket
The UserAuthenticationTicket to verify
The UserAuthenticationTicket to verify