Sholo.Web.Security/Authentication/Device/Provider/CacheDeviceAuthenticationTicketProvider.cs
/// <summary>
/// Verify that the supplied DeviceAuthenticationTicket exists in the ticket store
/// </summary>
/// <param name="ticket">The DeviceAuthenticationTicket 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 DeviceAuthenticationTicket exists in the ticket store
Verify that the supplied DeviceAuthenticationTicket exists in the ticket store
public override bool VerifyTicket(DeviceAuthenticationTicket ticket)
        {
            if (ticket == null)
            {
                throw new ArgumentNullException("ticket", "DeviceAuthenticationTicket parameter cannot be null.");
            }
            string incomingTicket = ticket.Key;
            DeviceAuthenticationTicket cacheAuthTicket = GetTicket(incomingTicket);
            if (cacheAuthTicket != null)
            {
                string cacheTicket = cacheAuthTicket.Key;
                if (cacheTicket == incomingTicket)
                {
                    return true;
                }
            }
            else
            {
                return false;
            }
            return false;
        }
public override bool VerifyTicket ( DeviceAuthenticationTicket ticket ) { if ( ticket == null ) { throw new ArgumentNullException ( " " , " " ) ; } string incomingTicket = ticket . Key ; DeviceAuthenticationTicket cacheAuthTicket = GetTicket ( incomingTicket ) ; if ( cacheAuthTicket != null ) { string cacheTicket = cacheAuthTicket . Key ; if ( cacheTicket == incomingTicket ) { return true ; } } else { return false ; } return false ; }
Verify that the supplied DeviceAuthenticationTicket exists in the ticket store
Verify that the supplied DeviceAuthenticationTicket exists in the ticket store
// TODO: See how to handle this.  For now, just return true // if (string.Compare(cacheAuthTicket.HostAddress, ticket.HostAddress, StringComparison.OrdinalIgnoreCase) != 0) // { //    return false; // }
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
DeviceAuthenticationTicket
The DeviceAuthenticationTicket to verify
The DeviceAuthenticationTicket to verify