src/DotNetCasClient.Redis/State/RedisServiceTicketManager.cs
/// <summary>
/// Inserts a CasAuthenticationTicket to the ticket store with a corresponding
/// ticket expiration date.
/// </summary>
/// <param name="casAuthenticationTicket">The CasAuthenticationTicket to insert</param>
/// <param name="expiration">The date and time at which the ticket expires</param>
/// <exception cref="ArgumentNullException">casAuthenticationTicket is null</exception>
Inserts a CasAuthenticationTicket to the ticket store with a corresponding
ticket expiration date.
Inserts a CasAuthenticationTicket to the ticket store with a corresponding ticket expiration date .
public void InsertTicket(CasAuthenticationTicket casAuthenticationTicket, DateTime expiration)
        {
            CommonUtils.AssertNotNull(casAuthenticationTicket, "casAuthenticationTicket parameter cannot be null.");
            var key = GetTicketKey(casAuthenticationTicket.ServiceTicket);
            var db = RedisClientManager.Instance.GetDatabase();
            db.StringSet(key, SerializationUtil.Serialize(casAuthenticationTicket), expiration - DateTime.Now);
        }
public void InsertTicket ( CasAuthenticationTicket casAuthenticationTicket , DateTime expiration ) { CommonUtils . AssertNotNull ( casAuthenticationTicket , " " ) ; var key = GetTicketKey ( casAuthenticationTicket . ServiceTicket ) ; var db = RedisClientManager . Instance . GetDatabase ( ) ; db . StringSet ( key , SerializationUtil . Serialize ( casAuthenticationTicket ) , expiration - DateTime . Now ) ; }
Inserts a CasAuthenticationTicket to the ticket store with a corresponding
ticket expiration date.
Inserts a CasAuthenticationTicket to the ticket store with a corresponding ticket expiration date .
casAuthenticationTicket is null
casAuthenticationTicket is null
casAuthenticationTicket
CasAuthenticationTicket
The CasAuthenticationTicket to insert
The CasAuthenticationTicket to insert
expiration
DateTime
The date and time at which the ticket expires
The date and time at which the ticket expires