Class KerberosSupplementalTicketManager
Helper class to manage Kerberos Ticket Claims.
public static class KerberosSupplementalTicketManager
- Inheritance
-
KerberosSupplementalTicketManager
- Inherited Members
Methods
FromIdToken(string)
Creates a KerberosSupplementalTicket object from given ID token string..
public static KerberosSupplementalTicket FromIdToken(string idToken)
Parameters
idToken
stringID token string.
Returns
- KerberosSupplementalTicket
A KerberosSupplementalTicket object if a Kerberos Ticket Claim exists in the given idToken parameter and is parsed correctly. Null, otherwise.
GetKerberosTicketFromWindowsTicketCache(string)
Reads a Kerberos Service Ticket associated with given service principal name from current user's Ticket Cache. Windows only.
public static byte[] GetKerberosTicketFromWindowsTicketCache(string servicePrincipalName)
Parameters
servicePrincipalName
stringService principal name to find associated Kerberos Ticket.
Returns
- byte[]
Byte stream of searched Kerberos Ticket information if exists. Null, otherwise.
Remarks
Throws Win32Exception if error occurs while searching ticket information from Ticket Cache.
GetKerberosTicketFromWindowsTicketCache(string, long)
Reads a Kerberos Service Ticket associated with given service principal name from current user's Ticket Cache.
public static byte[] GetKerberosTicketFromWindowsTicketCache(string servicePrincipalName, long logonId)
Parameters
servicePrincipalName
stringService principal name to find associated Kerberos Ticket.
logonId
longThe Logon Id of the user owning the ticket cache. The default of 0 represents the currently logged on user.
Returns
- byte[]
Byte stream of searched Kerberos Ticket information if exists. Null, otherwise.
Remarks
Throws Win32Exception if error occurs while searching ticket information from Ticket Cache.
GetKrbCred(KerberosSupplementalTicket)
Gets the KRB-CRED Kerberos Ticket information as byte stream.
public static byte[] GetKrbCred(KerberosSupplementalTicket ticket)
Parameters
ticket
KerberosSupplementalTicketKerberos ticket object to save.
Returns
- byte[]
Byte stream representation of KRB-CRED Kerberos Ticket if it contains valid ticket information. Null, otherwise.
SaveToWindowsTicketCache(KerberosSupplementalTicket)
Save current Kerberos Ticket to current user's Ticket Cache.
public static void SaveToWindowsTicketCache(KerberosSupplementalTicket ticket)
Parameters
ticket
KerberosSupplementalTicketKerberos ticket object to save.
Remarks
Throws ArgumentException when given ticket parameter is not a valid Kerberos supplemental ticket. Throws Win32Exception if error occurs while saving ticket information into Ticket Cache.
SaveToWindowsTicketCache(KerberosSupplementalTicket, long)
Save current Kerberos Ticket to current user's Ticket Cache. Windows only.
public static void SaveToWindowsTicketCache(KerberosSupplementalTicket ticket, long logonId)
Parameters
ticket
KerberosSupplementalTicketKerberos ticket object to save.
logonId
longThe Logon Id of the user owning the ticket cache. The default of 0 represents the currently logged on user.
Remarks
Throws ArgumentException when given ticket parameter is not a valid Kerberos supplemental ticket. Throws Win32Exception if error occurs while saving ticket information into Ticket Cache.