Documentation of the CarRentalAgentService

TicketGrantingTicket Class

This class represents a ticket granting ticket which is required to authenticate against CarRentalAgentService interface.

For a list of all members of this type, see TicketGrantingTicket Members.

System.Object
   Data
      TicketGrantingTicket

public class TicketGrantingTicket : Data

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

A TicketGrantingTicket is a ticket you will have to request before you can request a service Ticket. This class is part of a common methodology to authenticate, named "challenge/response" authentication. One of the most known challenge/response authentications is Kerberos.

The authentication procedure used by CarRentalAgentService is similar to Kerberos. For more information, refer to the CarRentalAgentService SDK - Reference Manual.

This class will be returned as member of TicketGrantingTicketResponse in return to a TicketGrantingTicketRequest. It contains an authentication Token, which is used for all authentication methods.

Second, the Secret property is being populated by the service once a TicketGrantingTicket is populated. This secret is an essential part of the authentication procedure. Your client implementation will have to decrypt this secret and encrypt a new secret (so called "response secret") based on the information provided by the initial secret from CarRentalAgentService.

Both Token and Secret properties are required to be set when requesting a service Ticket with TicketRequest.

Example

The usage of TicketGrantingTicket within the authentication procedure.
For detailed sample code of the whole authentication procedure, please refer to TicketGrantingTicketRequest.

[C#]
// prepare the request
TicketGrantingTicketRequest grantRq = new TicketGrantingTicketRequest();
grantRq.OperatorKey = this.opKey;

// get a ticket granting ticket
TicketGrantingTicketResponse grantRs = this.carAgent.GetTicketGrantingTicket(grantRq);
TicketGrantingTicket grantTicket = grantRs.TicketGrantingTicket;

// at this stage, you will have to create your response secret and
// update the retrieved granting ticket with the new response secret
grantTicket.Secret = this.secretGenerator.CreateResponseSecret(grantTicket.Secret);

// now we can request the real service ticket
TicketRequest serviceRq = new TicketRequest();
serviceRq.TicketGrantingTicket = grantTicket;

TicketResponse serviceRs = this.carAgent.GetTicket(serviceRq);
this.serviceTicket = serviceRs.Ticket;

Requirements

Namespace: SunnyCars.Schema.Osi.WsReservation.V4

Assembly: Sunnycars.Schema.Osi.WsReservation.V4 (in Sunnycars.Schema.Osi.WsReservation.V4.dll)

See Also

TicketGrantingTicket Members | SunnyCars.Schema.Osi.WsReservation.V4 Namespace | Ticket